{"config":{"separator":"[\\s\\-_,:!=\\[\\]()\\\\\"`/]+|\\.(?!\\d)"},"items":[{"location":"","level":1,"title":"Overview","text":"
This documentation covers the standalone rewrite located in nspanel-lovelace-ui/.
It is a Python backend that:
This docs set is intentionally separate from the AppDaemon docs in docs/.
nspanel-lovelace-ui/nspanel-lovelace-ui/rootfs/usr/bin/mqtt-manager/nspanel-lovelace-ui/rootfs/usr/bin/mqtt-manager/panels.yaml.examplecardEntitiescardGrid (auto-switches to cardGrid2 when needed)cardQRcardPowercardMediacardThermocardAlarmcardUnlockpanels.yaml.cardEntitiescardGridcardQRcardPowercardMediacardThermocardAlarmcardUnlocktype yes string Card type. title no string Card title. key no string Navigation key used by navigate.<key>.","path":["Cards"],"tags":[]},{"location":"cards/#cardentities-and-cardgrid","level":2,"title":"cardEntities and cardGrid","text":"- type: cardEntities\n title: Main\n key: main\n entities:\n - entity: light.kitchen\n - entity: navigate.settings\n icon: mdi:cog\n entities is required.cardGrid auto-switches to cardGrid2 if more than 6 entities are present.cardQR","text":"- type: cardQR\n title: Guest WiFi\n qrCode: \"WIFI:S:myssid;T:WPA;P:mypassword;;\"\n entities:\n - entity: iText.myssid\n name: SSID\n icon: mdi:wifi\n Keys:
qrCode optional (default value exists, but set it explicitly)entity / entitiescardPower","text":"- type: cardPower\n title: Energy\n entities:\n - entity: sensor.house_power\n - entity: delete\n - entity: sensor.solar_power\n Notes:
entities is required.speed key is accepted in config but currently not applied by the renderer.cardMedia","text":"- type: cardMedia\n title: Living Room\n entity: media_player.living_room\n entities:\n - entity: light.ambient\n - entity: switch.tv_bias_light\n Notes:
entity or first generated entity).entities are rendered as action buttons on the bottom row.cardThermo","text":"- type: cardThermo\n title: Heating\n entity: climate.downstairs\n supported_modes: [\"heat\", \"off\"]\n Keys:
entity requiredsupported_modes optional (filters shown HVAC mode buttons)cardAlarm","text":"- type: cardAlarm\n title: House Alarm\n entity: alarm_control_panel.house\n supported_modes: [\"arm_home\", \"arm_away\", \"arm_night\"]\n Keys:
entity requiredsupported_modes optionalcardUnlock","text":"- type: cardUnlock\n title: Admin\n pin: 1234\n destination: navigate.admin\n Keys:
pin requireddestination requiredTypical target in hiddenCards:
hiddenCards:\n - type: cardGrid\n key: admin\n title: Admin\n entities:\n - entity: switch.maintenance_mode\n","path":["Cards"],"tags":[]},{"location":"configuration/","level":1,"title":"Configuration","text":"The runtime reads one YAML file (default: ./panels.yaml, add-on mode: /config/panels.yaml).
nspanels yes object none Map of panel definitions. home_assistant_address recommended string none Home Assistant base URL. In add-on mode it is auto-filled as http://supervisor if missing. home_assistant_token recommended string none Long-lived token or Supervisor token. mqtt_server required in MQTT mode string from env MQTT host. mqtt_port required in MQTT mode int from env MQTT port. mqtt_username required in MQTT mode string from env MQTT username. mqtt_password required in MQTT mode string from env MQTT password. use_ha_api optional any absent If present, MQTT input mode is disabled and HA event mode is used. timeZone optional string Europe/Berlin Global fallback for panel timeZone. hiddenCards optional list [] Global fallback for panel hiddenCards.","path":["Configuration"],"tags":[]},{"location":"configuration/#panel-keys-nspanelsname","level":2,"title":"Panel keys (nspanels.<name>)","text":"key required type default description panelRecvTopic yes string none Receive channel for panel events. panelSendTopic yes string none Send channel for panel commands. locale yes string none Locale used for translations and date formatting. timeZone recommended string from top-level timeZone Time zone for clock. timeFormat yes string none Python strftime format. dateFormat yes string none Babel date format (example: full, medium). model optional string eu Panel model (eu, us-p, us-l). temp_unit optional string celsius Thermostat card unit (celsius or fahrenheit). sleepTimeout optional int 20 Seconds before screensaver. sleepBrightness optional int or entity_id 10 Screensaver brightness. screenBrightness optional int or entity_id 100 Active-screen brightness. sleepTracking optional entity_id none Forces sleep brightness to 0 when entity state matches sleepTrackingZones. sleepTrackingZones optional list [\"not_home\", \"off\"] States that trigger forced dimming. sleepOverride optional object none Override sleep brightness when entity is on/true/home. defaultBackgroundColor optional string ha-dark ha-dark or black. featExperimentalSliders optional int 0 Forwarded in dimmode command. defaultCard optional string none Default card when leaving screensaver (navigate.<key>). screensaver yes object none Screensaver definition. cards yes list none Top-level cards. hiddenCards optional list [] Hidden cards addressable through navigate.<key>.","path":["Configuration"],"tags":[]},{"location":"configuration/#brightness-behavior","level":2,"title":"Brightness behavior","text":"Example:
sleepBrightness: input_number.nspanel_sleep\nscreenBrightness: input_number.nspanel_awake\nsleepTracking: person.john\nsleepTrackingZones: [\"not_home\", \"off\"]\nsleepOverride:\n entity: light.bedroom\n brightness: 30\n","path":["Configuration"],"tags":[]},{"location":"connection-modes/","level":1,"title":"Connection Modes","text":"The rewrite supports two panel input/output modes.
","path":["Connection Modes"],"tags":[]},{"location":"connection-modes/#1-mqtt-mode-default","level":2,"title":"1) MQTT mode (default)","text":"Enabled when:
mqtt_server is configureduse_ha_api is not presentBehavior:
panelRecvTopicCustomRecvpanelSendTopicExample receive payload:
{\"CustomRecv\":\"event,startup,54,eu\"}\n","path":["Connection Modes"],"tags":[]},{"location":"connection-modes/#2-home-assistant-api-mode-use_ha_api","level":2,"title":"2) Home Assistant API mode (use_ha_api)","text":"Enabled when key use_ha_api exists in config.
Behavior:
esphome.nspanel.datadevice_id (must match configured panelRecvTopic)<panelSendTopic>_nspanelui_api_callService payload shape:
data: \"...panel command...\"\ncommand: 2\n","path":["Connection Modes"],"tags":[]},{"location":"connection-modes/#common-to-both-modes","level":2,"title":"Common to both modes","text":"Entities are used in cards and screensaver lists.
","path":["Entities"],"tags":[]},{"location":"entities/#entity-keys","level":2,"title":"Entity keys","text":"key required type descriptionentity yes string Home Assistant entity id, or internal entity (navigate.*, delete, iText.*). name no string Display name override. icon no string or map Icon override (mdi:*), optionally per state. color no [r,g,b] or map Color override, optionally per state. value no string Value override. font no string Icon font variant (small, medium, medium-icon, large). status no string Extra status entity for navigate.* items. effectList no list Custom light effect list for detail popup. attribute no string Weather attribute to display. day no int Weather daily forecast index. hour no int Weather hourly forecast index. unit no string Value suffix.","path":["Entities"],"tags":[]},{"location":"entities/#supported-home-assistant-domains","level":2,"title":"Supported Home Assistant domains","text":"switchinput_booleanautomationlockinput_textinput_selectselectlightfanbuttoninput_buttonscenescriptnumberinput_numbertimeralarm_control_panelvacuummedia_playersunpersonclimatecoversensorbinary_sensorweathernavigate.<key>: Navigate to card with matching key.navigate.UP: Navigate back.delete: Placeholder/empty slot.iText.<text>: Static text entry.The rewrite supports Home Assistant template rendering for selected fields when prefixed with ha::
icon: \"ha:{{ ... }}\"color: \"ha:{{ ... }}\" (must evaluate to JSON RGB list)value: \"ha:{{ ... }}\"qrCode: \"ha:{{ ... }}\"Example:
- entity: light.kitchen\n icon:\n \"on\": mdi:lightbulb\n \"off\": mdi:lightbulb-outline\n color:\n \"on\": [255, 210, 90]\n \"off\": [80, 120, 170]\n","path":["Entities"],"tags":[]},{"location":"getting-started/","level":1,"title":"Getting Started","text":"","path":["Getting Started"],"tags":[]},{"location":"getting-started/#home-assistant-add-on-mode","level":2,"title":"Home Assistant add-on mode","text":"In add-on mode, the container startup script:
CONFIG_FILE=/config/panels.yaml/config/panels.yaml from the bundled example if it does not existRelevant files:
nspanel-lovelace-ui/rootfs/usr/bin/mqtt-manager/run.shnspanel-lovelace-ui/config.yamlpanels.yaml","text":"Start with one panel:
home_assistant_address: \"http://supervisor\"\nhome_assistant_token: \"SUPERVISOR_TOKEN_OR_LONG_LIVED_TOKEN\"\n\nnspanels:\n kitchen:\n panelRecvTopic: \"tele/tasmota_kitchen/RESULT\"\n panelSendTopic: \"cmnd/tasmota_kitchen/CustomSend\"\n locale: \"en_US\"\n timeZone: \"Europe/Berlin\"\n timeFormat: \"%H:%M\"\n dateFormat: \"full\"\n screensaver:\n entities:\n - entity: weather.home\n cards:\n - type: cardEntities\n title: Main\n entities:\n - entity: light.kitchen\n - entity: switch.coffee_machine\n","path":["Getting Started"],"tags":[]},{"location":"getting-started/#important-notes","level":2,"title":"Important notes","text":"cards and screensaver are required per panel.timeFormat, dateFormat, and locale should be set per panel.panelRecvTopic / panelSendTopic are required.If you run this container/process outside Supervisor:
home_assistant_address and home_assistant_token in YAMLmqtt_server, mqtt_port, mqtt_username, mqtt_password) or environmentCONFIG_FILE if the config is not ./panels.yamlThis page explains how to migrate panel configuration from the legacy AppDaemon apps.yaml format to the standalone rewrite panels.yaml format.
Old (AppDaemon):
apps.yamlappdaemon.yaml, plugin config, and app config)New (rewrite):
panels.yaml (usually /config/panels.yaml)Old AppDaemon (apps.yaml):
nspanel-1:\n module: nspanel-lovelace-ui\n class: NsPanelLovelaceUIManager\n config:\n panelRecvTopic: \"tele/tasmota_panel/RESULT\"\n panelSendTopic: \"cmnd/tasmota_panel/CustomSend\"\n model: eu\n locale: en_US\n timeFormat: \"%H:%M\"\n New rewrite (panels.yaml):
home_assistant_address: \"http://supervisor\"\nhome_assistant_token: \"YOUR_TOKEN\"\n\nnspanels:\n panel-1:\n panelRecvTopic: \"tele/tasmota_panel/RESULT\"\n panelSendTopic: \"cmnd/tasmota_panel/CustomSend\"\n model: eu\n locale: en_US\n timeZone: \"Europe/Berlin\"\n timeFormat: \"%H:%M\"\n dateFormat: \"full\"\n screensaver:\n entities:\n - entity: weather.home\n cards:\n - type: cardEntities\n title: Main\n entities:\n - entity: light.kitchen\n","path":["Migration from AppDaemon Config"],"tags":[]},{"location":"migration-appdaemon/#key-mapping","level":2,"title":"Key mapping","text":"Legacy AppDaemon key or concept Standalone rewrite Notes module, class, config wrapper removed Rewrite uses nspanels.<panel_name> directly. panelRecvTopic panelRecvTopic Same meaning. panelSendTopic panelSendTopic Same meaning. model model Same meaning (eu, us-p, us-l). locale locale Same meaning. timeFormat timeFormat Same meaning. timezone (legacy docs casing) timeZone Use exact camelCase timeZone. dateFormatBabel / dateFormat dateFormat Rewrite expects dateFormat. cards cards Same concept. hiddenCards hiddenCards Same concept. screensaver screensaver Same concept; some legacy theme options are not available. defaultCard under screensaver usage defaultCard (panel level) Use as panel-level key in rewrite. temperatureUnit (card-level legacy usage) temp_unit (panel level) Rewrite reads panel-level temp_unit. sleepBrightness list schedule not supported Rewrite supports integer or entity id, not list-based schedules. screenBrightness list schedule not supported Rewrite supports integer or entity id, not list-based schedules. sleepTracking sleepTracking Same concept. sleepTrackingZones sleepTrackingZones Same concept. sleepOverride sleepOverride Same concept. updateMode / OTA URL overrides (displayURL-*, berryURL) not supported Rewrite does not implement these legacy update keys. theme, dateAdditionalTemplate, timeAdditionalTemplate not supported Not implemented in rewrite config.","path":["Migration from AppDaemon Config"],"tags":[]},{"location":"migration-appdaemon/#connection-config-differences","level":2,"title":"Connection config differences","text":"In AppDaemon setups, MQTT and Home Assistant connectivity was mostly configured via AppDaemon plugin settings.
In the rewrite, connectivity is resolved directly by the runtime:
home_assistant_addresshome_assistant_tokenmqtt_server, mqtt_port, mqtt_username, mqtt_passworduse_ha_api to use Home Assistant event mode instead of MQTT receive modeSome legacy entity config fields are not implemented in the rewrite parser/renderer:
state, state_not, state_templateservice.* action entries with custom dataaction_nameSupported and commonly used fields in rewrite:
entity, name, icon, color, value, fontattribute, day, hour, uniteffectListstatus for navigate.* entities/config/panels.yaml from the rewrite example.nspanel-1, nspanel-2, ...) into nspanels.module/class/config wrappers.timezone to timeZone.dateFormat, timeFormat, screensaver, and cards.screensaver is a required object in each panel config.
type no string screensaver Layout type (screensaver / screensaver2). entities yes* list none Screensaver entities. entity yes* string none Single-entity shortcut. statusIcon1 no object none Left status icon near date. statusIcon2 no object none Right status icon near date. doubleTapToUnlock no bool false Requires double tap when leaving screensaver. sleepTimeout no int panel sleepTimeout Per-screensaver timeout override. * Provide at least one of entity or entities.
Screensaver entities use the same entity format as other cards.
For weather.<entity> you can also use:
attribute (default temperature)day (daily forecast index)hour (hourly forecast index)unit (suffix, default °C for temperature-like attributes)screensaver:\n type: screensaver\n doubleTapToUnlock: true\n sleepTimeout: 30\n statusIcon1:\n entity: binary_sensor.front_door\n icon:\n \"on\": mdi:door-open\n \"off\": mdi:door-closed\n font: medium-icon\n statusIcon2:\n entity: sensor.outdoor_temperature\n icon: mdi:thermometer\n entities:\n - entity: weather.home\n attribute: temperature\n - entity: weather.home\n day: 1\n attribute: temperature\n - entity: weather.home\n day: 2\n attribute: temperature\n - entity: sensor.indoor_temperature\n icon: mdi:home-thermometer\n","path":["Screensaver"],"tags":[]},{"location":"troubleshooting/","level":1,"title":"Troubleshooting","text":"","path":["Troubleshooting"],"tags":[]},{"location":"troubleshooting/#config-does-not-load","level":2,"title":"Config does not load","text":"Symptoms:
Checks:
CONFIG_FILE path.panelRecvTopic, panelSendTopic, locale, timeFormat, dateFormat, screensaver, cards.Symptoms:
Checks:
mqtt_server, mqtt_port, mqtt_username, mqtt_password.panelRecvTopic.CustomRecv JSON key.Symptoms:
Checks:
home_assistant_address and home_assistant_token.Checks:
navigate.<key>, confirm target card has matching key.cardUnlock, confirm destination and pin are set.type is one of the implemented types.Checks:
sleepTracking, sleepTrackingZones, and sleepOverride.Config file not foundError while parsing YAML fileConnected to MQTT ServerHome Assistant auth OKcard type ... not implementedNot implemented: <button action>