joBr99 / nspanel-lovelace-ui

Custom Firmware for NsPanel with the design of HomeAssistant's lovelace UI in mind, works with Tasmota.
GNU General Public License v3.0
895 stars 190 forks source link

[Help] Dynamic values on screensaver via HA template #506

Closed ChrisMZ closed 2 years ago

ChrisMZ commented 2 years ago

PROBLEM DESCRIPTION

I'm trying to use a HA template to display a dynamic value on the screensaver as described here:

https://docs.nspanel.pky.eu/entities/#possible-configuration-values-for-entities-key

Example given:

        statusIcon2:
        entity: climate.wohnzimmer_boden
        icon: 'ha:{{ state_attr("climate.wohnzimmer_boden","current_temperature")}}'`

However I always get the "circled exclamation mark" in the upper left corner of the screensaver instead of the desired value. For instance I tried the following in my setup:

  screensaver:
      entity: weather.home
      statusIcon1:
        entity: climate.wohnzimmer_2
        icon: 'ha:{{ state_attr("climate.wohnzimmer_2","current_temperature")}}'
      theme:
        autoWeather: true

While the template {{ state_attr("climate.wohnzimmer_2","current_temperature")}} returns the correct value (i.e. "21.5") when tested in HA developer tools, on the panel there only is said "exclamation-circle".

Help would be greatly appreciated.

[x] I've double checked each step explained in the FAQ:

https://docs.nspanel.pky.eu/faq/

REQUESTED INFORMATION

Make sure your have performed every step and checked the applicable boxes before submitting your issue. Thank you!

2022-10-06 23_10_29-NSPanel1 - MQTT konfigurieren


- [ ] Provide your apps.yaml:

nspanel-1: module: nspanel-lovelace-ui class: NsPanelLovelaceUIManager config: panelRecvTopic: "tele/nspanel1/RESULT" panelSendTopic: "cmnd/nspanel1/CustomSend" locale: "de_DE" screensaver: entity: weather.home statusIcon1: entity: climate.wohnzimmer_2 icon: 'ha:{{ state_attr("climate.wohnzimmer_2","current_temperature")}}' theme: autoWeather: true cards:

- [ ] Go to Settings>Add-ons>AppDaemon>Log and then, provide the output of the log after restarting the appdaemon container:

s6-rc: info: service legacy-cont-init: starting cont-init: info: running /etc/cont-init.d/00-banner.sh

Add-on: AppDaemon Python Apps and Dashboard using AppDaemon 4.x for Home Assistant

Add-on version: 0.9.3 You are running the latest version of this add-on. System: Home Assistant OS 9.0 (amd64 / qemux86-64) Home Assistant Core: 2022.10.0 Home Assistant Supervisor: 2022.09.1

Please, share the above information when looking for help or support in, e.g., GitHub, forums or the Discord chat.

cont-init: info: /etc/cont-init.d/00-banner.sh exited 0 cont-init: info: running /etc/cont-init.d/01-log-level.sh cont-init: info: /etc/cont-init.d/01-log-level.sh exited 0 cont-init: info: running /etc/cont-init.d/appdaemon.sh cont-init: info: /etc/cont-init.d/appdaemon.sh exited 0 s6-rc: info: service legacy-cont-init successfully started s6-rc: info: service legacy-services: starting services-up: info: copying legacy longrun appdaemon (no readiness notification) s6-rc: info: service legacy-services successfully started [23:14:29] INFO: Starting AppDaemon... 2022-10-06 23:14:34.900043 INFO AppDaemon: AppDaemon Version 4.2.1 starting 2022-10-06 23:14:34.900378 INFO AppDaemon: Python version is 3.10.5 2022-10-06 23:14:34.900575 INFO AppDaemon: Configuration read from: /config/appdaemon/appdaemon.yaml 2022-10-06 23:14:34.900767 INFO AppDaemon: Added log: AppDaemon 2022-10-06 23:14:34.901042 INFO AppDaemon: Added log: Error 2022-10-06 23:14:34.901232 INFO AppDaemon: Added log: Access 2022-10-06 23:14:34.901418 INFO AppDaemon: Added log: Diag 2022-10-06 23:14:35.119752 INFO AppDaemon: Loading Plugin HASS using class HassPlugin from module hassplugin 2022-10-06 23:14:35.364038 INFO HASS: HASS Plugin Initializing 2022-10-06 23:14:35.364485 INFO HASS: HASS Plugin initialization complete 2022-10-06 23:14:35.364888 INFO AppDaemon: Loading Plugin MQTT using class MqttPlugin from module mqttplugin 2022-10-06 23:14:35.520473 INFO MQTT: MQTT Plugin Initializing 2022-10-06 23:14:35.520771 INFO MQTT: Using 'appdaemon/status' as Will Topic 2022-10-06 23:14:35.521000 INFO MQTT: Using 'appdaemon/status' as Birth Topic 2022-10-06 23:14:35.521826 INFO AppDaemon: Initializing HTTP 2022-10-06 23:14:35.522300 INFO AppDaemon: Using 'ws' for event stream 2022-10-06 23:14:35.528760 INFO AppDaemon: Starting API 2022-10-06 23:14:35.533185 INFO AppDaemon: Starting Admin Interface 2022-10-06 23:14:35.533723 INFO AppDaemon: Starting Dashboards 2022-10-06 23:14:35.558445 INFO HASS: Connected to Home Assistant 2022.10.0 2022-10-06 23:14:35.601661 INFO MQTT: Connected to Broker at URL 192.168.1.91:1883 2022-10-06 23:14:35.625249 INFO AppDaemon: Got initial state from namespace mqtt 2022-10-06 23:14:35.626237 INFO MQTT: MQTT Plugin initialization complete 2022-10-06 23:14:35.627859 INFO AppDaemon: App 'nspanel-1' added 2022-10-06 23:14:35.629499 INFO AppDaemon: Found 1 total apps 2022-10-06 23:14:35.630645 INFO AppDaemon: Starting Apps with 1 workers and 1 pins 2022-10-06 23:14:35.632528 INFO AppDaemon: Running on port 5050 2022-10-06 23:14:35.669763 INFO HASS: Evaluating startup conditions 2022-10-06 23:14:35.685581 INFO HASS: Startup condition met: hass state=RUNNING 2022-10-06 23:14:35.686012 INFO HASS: All startup conditions met 2022-10-06 23:14:35.739326 INFO AppDaemon: Got initial state from namespace default 2022-10-06 23:14:37.642252 INFO AppDaemon: Scheduler running in realtime 2022-10-06 23:14:37.647419 INFO AppDaemon: Adding /config/appdaemon/apps to module import path 2022-10-06 23:14:37.647986 INFO AppDaemon: Adding /config/appdaemon/apps/nspanel-lovelace-ui to module import path 2022-10-06 23:14:37.648481 INFO AppDaemon: Adding /config/appdaemon/apps/nspanel-lovelace-ui/luibackend to module import path 2022-10-06 23:14:37.649005 INFO AppDaemon: Adding /config/appdaemon/apps/nspanel-lovelace-ui/luibackend/translations to module import path 2022-10-06 23:14:37.649542 INFO AppDaemon: Adding /config/appdaemon/apps/nspanel-lovelace-ui/luibackend/translations/frontend to module import path 2022-10-06 23:14:37.650166 INFO AppDaemon: Adding /config/appdaemon/apps/nspanel-lovelace-ui/luibackend/translations/backend to module import path 2022-10-06 23:14:37.666872 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/hello.py - ignoring 2022-10-06 23:14:37.668228 INFO AppDaemon: Loading App Module: /config/appdaemon/apps/nspanel-lovelace-ui/nspanel-lovelace-ui.py 2022-10-06 23:14:37.914016 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/nspanel-lovelace-ui/luibackend/config.py - ignoring 2022-10-06 23:14:37.915301 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/nspanel-lovelace-ui/luibackend/icon_mapping.py - ignoring 2022-10-06 23:14:37.916548 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/nspanel-lovelace-ui/luibackend/controller.py - ignoring 2022-10-06 23:14:37.917725 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/nspanel-lovelace-ui/luibackend/helper.py - ignoring 2022-10-06 23:14:37.918936 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/nspanel-lovelace-ui/luibackend/updater.py - ignoring 2022-10-06 23:14:37.920096 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/nspanel-lovelace-ui/luibackend/icons.py - ignoring 2022-10-06 23:14:37.921329 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/nspanel-lovelace-ui/luibackend/apis.py - ignoring 2022-10-06 23:14:37.922693 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/nspanel-lovelace-ui/luibackend/theme.py - ignoring 2022-10-06 23:14:37.923913 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/nspanel-lovelace-ui/luibackend/localization.py - ignoring 2022-10-06 23:14:37.925124 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/nspanel-lovelace-ui/luibackend/mqtt.py - ignoring 2022-10-06 23:14:37.926353 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/nspanel-lovelace-ui/luibackend/pages.py - ignoring 2022-10-06 23:14:37.927285 INFO AppDaemon: Initializing app nspanel-1 using class NsPanelLovelaceUIManager from module nspanel-lovelace-ui 2022-10-06 23:14:38.076369 INFO nspanel-1: Starting 2022-10-06 23:14:38.084933 INFO nspanel-1: Input config: {'panelRecvTopic': 'tele/nspanel1/RESULT', 'panelSendTopic': 'cmnd/nspanel1/CustomSend', 'locale': 'de_DE', 'screensaver': {'entity': 'weather.home', 'statusIcon1': {'entity': 'climate.wohnzimmer_2', 'icon': 'ha:{{ state_attr("climate.wohnzimmer_2","current_temperature")}}'}, 'theme': {'autoWeather': True}}, 'cards': [{'type': 'cardGrid', 'title': 'Panel Wohnzimmer', 'entities': [{'entity': 'navigate.cardEntities_Wz-Lichter', 'name': 'Licht Wohnen', 'icon': 'mdi:lightbulb-multiple', 'color': [255, 255, 0]}, {'entity': 'navigate.cardEntities_Ku-Lichter', 'name': 'Licht Küche', 'icon': 'mdi:lightbulb-multiple', 'color': [255, 255, 0]}, {'entity': 'navigate.cardEntities_Di-Lichter', 'name': 'Licht Diele', 'icon': 'mdi:lightbulb-multiple', 'color': [255, 255, 0]}, {'entity': 'navigate.cardThermo_Wz-Klima', 'name': 'A/C', 'icon': 'mdi:sun-snowflake-variant'}, {'entity': 'navigate.cardThermo_Wz-Heizung', 'name': 'Heizung', 'icon': 'mdi:thermometer', 'color': [255, 50, 0]}, {'entity': 'sensor.wandthermostat_w_temperature', 'color': [0, 255, 0], 'name': 'Temperatur'}]}], 'hiddenCards': [{'type': 'cardEntities', 'title': 'Licht Wohnen', 'key': 'Wz-Lichter', 'entities': [{'entity': 'switch.sonoffwohnzimmerlampe'}, {'entity': 'switch.kommode_socket'}, {'entity': 'light.elefanttasmota'}, {'entity': 'light.nanoleaf_light_panels_57_2b_69'}]}, {'type': 'cardEntities', 'title': 'Licht Küche', 'key': 'Ku-Lichter', 'entities': [{'entity': 'switch.sonoffschrankleuchten', 'name': 'Schrankleuchten'}, {'entity': 'switch.pflanze_socket'}, {'entity': 'light.kuchenlampe'}]}, {'type': 'cardEntities', 'title': 'Licht Diele', 'key': 'Di-Lichter', 'entities': [{'entity': 'light.diele_1'}, {'entity': 'light.diele_2'}, {'entity': 'light.diele2', 'name': 'Bodenlampe'}, {'entity': 'switch.flurduft_socket'}]}, {'type': 'cardThermo', 'title': 'A/C', 'key': 'Wz-Klima', 'entity': 'climate.wohnzimmer'}, {'type': 'cardThermo', 'title': 'Heizung', 'key': 'Wz-Heizung', 'entity': 'climate.wohnzimmer_2'}]} 2022-10-06 23:14:38.086949 INFO nspanel-1: Loaded config: {'panelRecvTopic': 'tele/nspanel1/RESULT', 'panelSendTopic': 'cmnd/nspanel1/CustomSend', 'updateMode': 'auto-notify', 'model': 'eu', 'sleepTimeout': 20, 'sleepBrightness': 20, 'screenBrightness': 100, 'defaultBackgroundColor': 'ha-dark', 'sleepTracking': None, 'sleepTrackingZones': ['not_home', 'off'], 'sleepOverride': None, 'locale': 'de_DE', 'timeFormat': '%H:%M', 'dateFormatBabel': 'full', 'dateAdditionalTemplate': '', 'timeAdditionalTemplate': '', 'dateFormat': '%A, %d. %B %Y', 'cards': [{'type': 'cardGrid', 'title': 'Panel Wohnzimmer', 'entities': [{'entity': 'navigate.cardEntities_Wz-Lichter', 'name': 'Licht Wohnen', 'icon': 'mdi:lightbulb-multiple', 'color': [255, 255, 0]}, {'entity': 'navigate.cardEntities_Ku-Lichter', 'name': 'Licht Küche', 'icon': 'mdi:lightbulb-multiple', 'color': [255, 255, 0]}, {'entity': 'navigate.cardEntities_Di-Lichter', 'name': 'Licht Diele', 'icon': 'mdi:lightbulb-multiple', 'color': [255, 255, 0]}, {'entity': 'navigate.cardThermo_Wz-Klima', 'name': 'A/C', 'icon': 'mdi:sun-snowflake-variant'}, {'entity': 'navigate.cardThermo_Wz-Heizung', 'name': 'Heizung', 'icon': 'mdi:thermometer', 'color': [255, 50, 0]}, {'entity': 'sensor.wandthermostat_w_temperature', 'color': [0, 255, 0], 'name': 'Temperatur'}]}], 'screensaver': {'type': 'screensaver', 'entity': 'weather.home', 'weatherUnit': 'celsius', 'forecastSkip': 0, 'weatherOverrideForecast1': None, 'weatherOverrideForecast2': None, 'weatherOverrideForecast3': None, 'weatherOverrideForecast4': None, 'doubleTapToUnlock': False, 'alternativeLayout': False, 'defaultCard': None, 'key': 'screensaver', 'statusIcon1': {'entity': 'climate.wohnzimmer_2', 'icon': 'ha:{{ state_attr("climate.wohnzimmer_2","current_temperature")}}'}, 'theme': {'autoWeather': True}}, 'hiddenCards': [{'type': 'cardEntities', 'title': 'Licht Wohnen', 'key': 'Wz-Lichter', 'entities': [{'entity': 'switch.sonoffwohnzimmerlampe'}, {'entity': 'switch.kommode_socket'}, {'entity': 'light.elefanttasmota'}, {'entity': 'light.nanoleaf_light_panels_57_2b_69'}]}, {'type': 'cardEntities', 'title': 'Licht Küche', 'key': 'Ku-Lichter', 'entities': [{'entity': 'switch.sonoffschrankleuchten', 'name': 'Schrankleuchten'}, {'entity': 'switch.pflanze_socket'}, {'entity': 'light.kuchenlampe'}]}, {'type': 'cardEntities', 'title': 'Licht Diele', 'key': 'Di-Lichter', 'entities': [{'entity': 'light.diele_1'}, {'entity': 'light.diele_2'}, {'entity': 'light.diele2', 'name': 'Bodenlampe'}, {'entity': 'switch.flurduft_socket'}]}, {'type': 'cardThermo', 'title': 'A/C', 'key': 'Wz-Klima', 'entity': 'climate.wohnzimmer'}, {'type': 'cardThermo', 'title': 'Heizung', 'key': 'Wz-Heizung', 'entity': 'climate.wohnzimmer_2'}]} 2022-10-06 23:14:38.093877 INFO nspanel-1: Sending MQTT Message: pageType~pageStartup 2022-10-06 23:14:38.103270 INFO nspanel-1: Registering callbacks for the following items: ['navigate.cardEntities_Wz-Lichter', 'navigate.cardEntities_Ku-Lichter', 'navigate.cardEntities_Di-Lichter', 'navigate.cardThermo_Wz-Klima', 'navigate.cardThermo_Wz-Heizung', 'sensor.wandthermostat_w_temperature', 'switch.sonoffwohnzimmerlampe', 'switch.kommode_socket', 'light.elefanttasmota', 'light.nanoleaf_light_panels_57_2b_69', 'switch.sonoffschrankleuchten', 'switch.pflanze_socket', 'light.kuchenlampe', 'light.diele_1', 'light.diele_2', 'light.diele2', 'switch.flurduft_socket', 'climate.wohnzimmer', 'climate.wohnzimmer_2', 'weather.home', 'climate.wohnzimmer_2'] 2022-10-06 23:14:38.142732 INFO nspanel-1: Started 2022-10-06 23:14:38.145226 INFO AppDaemon: App initialization complete 2022-10-06 23:14:38.571588 INFO nspanel-1: MQTT callback for: {'topic': 'tele/nspanel1/RESULT', 'wildcard': None, 'payload': '{"CustomRecv":"event,startup,42,eu"}'} 2022-10-06 23:14:38.573012 INFO nspanel-1: Received Message from Screen: event,startup,42,eu 2022-10-06 23:14:38.574831 INFO nspanel-1: Sending MQTT Message: X 2022-10-06 23:14:38.579346 INFO nspanel-1: Update Pre-Check failed Tasmota Driver Version: None Panel Version: 42 2022-10-06 23:14:38.580901 INFO nspanel-1: Startup Event 2022-10-06 23:14:38.598739 INFO nspanel-1: Sending MQTT Message: time~23:14~ 2022-10-06 23:14:38.616867 INFO nspanel-1: Sending MQTT Message: date~Thursday, 06. October 2022 2022-10-06 23:14:38.622312 INFO nspanel-1: Sending MQTT Message: timeout~20 2022-10-06 23:14:38.626503 INFO nspanel-1: Sending MQTT Message: dimmode~20~100~6371 2022-10-06 23:14:38.630592 INFO nspanel-1: Started rendering of page None with type screensaver 2022-10-06 23:14:38.632476 INFO nspanel-1: Sending MQTT Message: pageType~screensaver 2022-10-06 23:14:38.656731 INFO nspanel-1: Sending MQTT Message: weatherUpdate~���~9.0��C~Fri~���~17.4��C~Sat~���~15.5��C~Sun~���~15.2��C~Mon~���~16.2��C~~~���~17299 2022-10-06 23:14:38.661281 INFO nspanel-1: Sending MQTT Message: color~0~65535~65535~65535~63469~65535~65535~65535~65535~65535~35957~35957~63469~31728~65535~65535~65535~65535~65535~65535~65535~65535 2022-10-06 23:14:38.676886 INFO nspanel-1: MQTT callback for: {'topic': 'tele/nspanel1/RESULT', 'wildcard': None, 'payload': '{"nlui_driver_version":"4"}'} 2022-10-06 23:14:38.678382 INFO nspanel-1: Update Pre-Check sucessful Tasmota Driver Version: 4 Panel Version: 42



### ADDITIONAL INFORMATION
NSPanel Info Page

![2022-10-06 23_24_59-NSPanel1 - Informationen](https://user-images.githubusercontent.com/87970330/194421906-034e8ed1-f4a9-496c-88b9-2bf740b72980.png)
joBr99 commented 2 years ago

Hey, this is part of the next release.

https://github.com/joBr99/nspanel-lovelace-ui/milestone/16?closed=1

You need to update to the latest dev version to use it, sorry for the confustion.

https://docs.nspanel.pky.eu/faq/#how-to-upgrade-from-a-release-to-the-current-development-version

ChrisMZ commented 2 years ago

Thank you very much for the quick response & all the work you put into this awsome project.

Cheers Chris