mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2025-12-22 07:24:24 +01:00
implement #124
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
HMI/nspanel.HMI
BIN
HMI/nspanel.HMI
Binary file not shown.
BIN
HMI/nspanel.tft
BIN
HMI/nspanel.tft
Binary file not shown.
@@ -299,6 +299,11 @@ class LuiController(object):
|
||||
if button_type == "tempUpd":
|
||||
temp = int(value)/10
|
||||
self._ha_api.get_entity(entity_id).call_service("set_temperature", temperature=temp)
|
||||
if button_type == "tempUpdHighLow":
|
||||
value = value.split("|")
|
||||
temp_high = int(value[0])/10
|
||||
temp_low = int(value[1])/10
|
||||
self._ha_api.get_entity(entity_id).call_service("set_temperature", target_temp_high=temp_high, target_temp_low=temp_low)
|
||||
if button_type == "hvac_action":
|
||||
self._ha_api.get_entity(entity_id).call_service("set_hvac_mode", hvac_mode=value)
|
||||
|
||||
|
||||
@@ -289,7 +289,11 @@ class LuiPagesGen(object):
|
||||
entity = self._ha_api.get_entity(item)
|
||||
heading = title if title != "unknown" else entity.attributes.friendly_name
|
||||
current_temp = get_attr_safe(entity, "current_temperature", "")
|
||||
dest_temp = int(get_attr_safe(entity, "temperature", 0)*10)
|
||||
dest_temp = get_attr_safe(entity, "temperature", None)
|
||||
if dest_temp is None:
|
||||
dest_temp = get_attr_safe(entity, "target_temp_high", 0)
|
||||
dest_temp2 = int(get_attr_safe(entity, "target_temp_low", 0)*10)
|
||||
dest_temp = int(dest_temp*10)
|
||||
|
||||
hvac_action = get_attr_safe(entity, "hvac_action", "")
|
||||
state_value = ""
|
||||
@@ -339,7 +343,7 @@ class LuiPagesGen(object):
|
||||
state_translation = get_translation(self._locale, "frontend.ui.panel.config.devices.entities.state")
|
||||
action_translation = get_translation(self._locale, "frontend.ui.card.climate.operation")
|
||||
|
||||
command = f"entityUpd~{heading}~{navigation}~{item}~{current_temp} {temperature_unit}~{dest_temp}~{state_value}~{min_temp}~{max_temp}~{step_temp}{icon_res}~{currently_translation}~{state_translation}~{action_translation}~{temperature_unit_icon}"
|
||||
command = f"entityUpd~{heading}~{navigation}~{item}~{current_temp} {temperature_unit}~{dest_temp}~{state_value}~{min_temp}~{max_temp}~{step_temp}{icon_res}~{currently_translation}~{state_translation}~{action_translation}~{temperature_unit_icon}~{dest_temp2}"
|
||||
self._send_mqtt_msg(command)
|
||||
|
||||
def generate_media_page(self, navigation, title, entity, mediaBtn):
|
||||
@@ -557,7 +561,7 @@ class LuiPagesGen(object):
|
||||
elif pos_status == "closed":
|
||||
icon_down_status = "disable"
|
||||
|
||||
pos_translation = get_translation(self._locale, "frontend.ui.card.light.position")
|
||||
pos_translation = get_translation(self._locale, "frontend.ui.card.cover.position")
|
||||
self._send_mqtt_msg(f"entityUpdateDetail~{pos}~{pos_translation}: {pos_status}~{pos_translation}~{icon_id}~{icon_up}~{icon_stop}~{icon_down}~{icon_up_status}~{icon_stop_status}~{icon_down_status}")
|
||||
|
||||
def send_message_page(self, ident, heading, msg, b1, b2):
|
||||
|
||||
Reference in New Issue
Block a user