This commit is contained in:
Johannes
2022-06-01 17:45:16 +02:00
parent b5f4ef4fc8
commit 65a5b235cf
5 changed files with 9 additions and 4 deletions

View File

@@ -129,7 +129,10 @@ The following message can be used to update the content on the cardEntities Page
### cardMedia Page ### cardMedia Page
`entityUpd~*heading*~*navigation*~*internalNameEntiy*~*icon*~*title*~*author*~*volume*~*playpauseicon*~currentSpeaker~speakerList-seperated-by-?` onoffbtn has to be`disable` to disable the on off btn
tIconBtnEntityName is the entiy name used in the button event for pressing the upper left icon
`entityUpd~*heading*~*navigation*~*internalNameEntiy*~*icon*~*title*~*author*~*volume*~*playpauseicon*~currentSpeaker~speakerList-seperated-by-?~onoffbtn~tIconBtnEntityName`
### cardAlarm Page ### cardAlarm Page

Binary file not shown.

Binary file not shown.

View File

@@ -447,6 +447,7 @@ key | optional | type | default | description
`title` | True | string | `None` | Title of the Page `title` | True | string | `None` | Title of the Page
`entity` | False | string | `None` | contains the entity of the current card, valid for cardThermo, cardAlarm and cardMedia `entity` | False | string | `None` | contains the entity of the current card, valid for cardThermo, cardAlarm and cardMedia
`key` | True | string | `None` | Used by navigate items `key` | True | string | `None` | Used by navigate items
`mediaControl` | True | string | `None` | Only valid on cardMedia, contains the action executed on pressing the top left media icon. (useful to navigate to a hidden card or start a script)
#### Possible configuration values for screensaver config #### Possible configuration values for screensaver config

View File

@@ -329,7 +329,7 @@ class LuiPagesGen(object):
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}"
self._send_mqtt_msg(command) self._send_mqtt_msg(command)
def generate_media_page(self, navigation, title, entity): def generate_media_page(self, navigation, title, entity, mediaBtn):
item = entity.entityId item = entity.entityId
if not self._ha_api.entity_exists(item): if not self._ha_api.entity_exists(item):
command = f"entityUpd~Not found~{navigation}~{item}~{get_icon_id('alert-circle-outline')}~Please check your~apps.yaml in AppDaemon~~0~{get_icon_id('alert-circle-outline')}~~~disable" command = f"entityUpd~Not found~{navigation}~{item}~{get_icon_id('alert-circle-outline')}~Please check your~apps.yaml in AppDaemon~~0~{get_icon_id('alert-circle-outline')}~~~disable"
@@ -360,7 +360,7 @@ class LuiPagesGen(object):
onoffbutton = 1374 onoffbutton = 1374
else: else:
onoffbutton = rgb_dec565([255,152,0]) onoffbutton = rgb_dec565([255,152,0])
command = f"entityUpd~{heading}~{navigation}~{item}~{icon}~{title}~{author}~{volume}~{iconplaypause}~{source}~{speakerlist[:200]}~{onoffbutton}" command = f"entityUpd~{heading}~{navigation}~{item}~{icon}~{title}~{author}~{volume}~{iconplaypause}~{source}~{speakerlist[:200]}~{onoffbutton}~{mediaBtn}"
self._send_mqtt_msg(command) self._send_mqtt_msg(command)
def generate_alarm_page(self, navigation, entity): def generate_alarm_page(self, navigation, entity):
@@ -458,7 +458,8 @@ class LuiPagesGen(object):
temp_unit = card.raw_config.get("temperatureUnit", "celsius") temp_unit = card.raw_config.get("temperatureUnit", "celsius")
self.generate_thermo_page(navigation, card.title, card.entity, temp_unit) self.generate_thermo_page(navigation, card.title, card.entity, temp_unit)
if card.cardType == "cardMedia": if card.cardType == "cardMedia":
self.generate_media_page(navigation, card.title, card.entity) mediaBtn = card.raw_config.get("mediaControl", "")
self.generate_media_page(navigation, card.title, card.entity, mediaBtn)
if card.cardType == "cardAlarm": if card.cardType == "cardAlarm":
self.generate_alarm_page(navigation, card.entity) self.generate_alarm_page(navigation, card.entity)
if card.cardType == "screensaver": if card.cardType == "screensaver":