README | Documentation | Installation | Configuration | Panels | FAQ
- Configuration
To get an idea of the configuration, take also a look into example configurations.
For time and date formats see:
Babel Documentation https://babel.pocoo.org/en/latest/dates.html#date-fields
Python Documenation https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes
-
time_format
stringTime format
-
date_format
stringDate format
-
date_format_babel
stringBabel date format
time_format: "%H:%M"
date_format: "%A, %d. %B %Y"
date_format_babel: "full"
device
dict
-
name
stringThe name of the panel device, defaults to received mqtt_name value
-
locale
stringThe locale of the device
-
button_left_entity
stringThe entity to use for button left. Default None.
-
button_right_entity
stringThe entity to use for button right. Default None.
-
show_home_button
boolShould the panels show a home button. Default False.
-
log_commands
boolShould commands be logged. Default False.
-
home_on_wakeup
boolShould the display exit the sleep/wakeup panel and return home directly after wakeup. Default False.
-
home_on_first_touch
boolShould the display exit the sleep/wakeup panel and return home on first iteraction event or wait until touched again. Default True.
-
home_only_when_on
boolShould the display exit the sleep/wakeup panel and return home only when the display state is on. Default False.
-
home_on_button_toggle
boolShould the display exit the sleep/wakeup panel and return home when a button is toggled. Default False.
-
always_return_to_home
boolShould the display always return to the home panel or should it restore the previous panel. Default False.
-
sound_on_startup
boolShould a sound be played when the display is connected after startup. Default True.
sound_on_notification
bool
Should a sound be played when the display recieves a notification. Default True.
device:
name: null
locale: "en_US"
button_left_entity: null
button_right_entity: null
show_home_button: false
log_commands: false
home_on_wakeup: false
home_on_first_touch: true
home_only_when_on: false
home_on_button_toggle: false
always_return_to_home: false
sound_on_startup: true
sound_on_notification: true
navigation
dict
navigation:
page_timeout: 2.0
notification
dict
notification: {}
mqtt
dict
mqtt:
topic_prefix: nspanel_haui/nspanel_haui
topic_prefix
The update controller is responsible for checking version informations and notify about any issues.
To enable update checks set an interval > 0 and/or set check_on_connect to true.
update
dict
update:
auto_install: True # Install tft file automatically if no or a unknown tft file is installed
auto_update: false # Update automatically on new releases
tft_filename: nspanel_haui.tft # The asset filename to load
check_on_connect: false # Should be checked for updates when connected
on_connect_delay: 60 # Delay between connect and check
interval: 0 # Set to 86400 for daily checks
auto_install
boolauto_update
booltft_filename
stringinterval
intcheck_on_connect
boolon_connect_delay
int
connection
dict
connection:
interval: null
overdue_factor: 2.0
interval
intoverdue_factor
float
gesture
dict
gesture: {}
panels
list
panels:
- type: panel_type
...
Config values:
# panel type (required)
type: panel_type # for ex. weather, grid, etc.
# panel mode (Default: panel)
mode: panel # string, panel, subpanel or popup
# internal identifier for panel
key: identifier # string, can be used for navigation with navigate:
# title of panel
title: Panel Title
# is panel the home panel
home_panel: false
# is panel the sleep panel
sleep_panel: false
# is panel the wakeup panel
wakeup_panel: false
# show home button (Default: device config value `show_home_button`)
show_home_button: null
# single entity
entity: None
# multiple entities
entities: []
# unlock code for panel
unlock_code: null
# close panel after amount of time
close_timeout: null
See Panels Overview for more details about the different panels and configuration.
A panel supports different modes:
panel
Panel, that shows up in navigation (Default)subpanel
Subpanel, will not show up in navigationpopup
Popup, will not show up in navigation
By default a panel will be used as a navigation panel.
Each panel configured will by default be included in the navigateable panels list. To not include a panel in the navigation, set mode
to subpanel
. When navigating to an panel that is not navigateable then this panel will be added to a stack, so that it is always possible to return to the last item navigated.
Entry Details, Popups, Settings, About and other special pages will not appear in navigation.
mode: panel
To be able to access a panel from within the configuration, the panel needs to have a key
defined. By this key the panel can be accessed now for navigation by using navigation.key
as an entity.
key: identifier
To automatically close a panel after some amount of time, set close_timeout
to a value bigger than 0.
close_timeout: 2.0
home_panel
bool
If not defined the first configured panel will be used. If defined, then the defined home panel will be used.
Only one panel can be a home panel
home_panel: true
sleep_panel
bool
After page_timeout the sleep panel will be activated.
Only one panel can be a sleep panel
sleep_panel: true
wakeup_panel
bool
wakeup_panel: true
When the display changes into dimmed state and a sleep panel is set or changes into sleep state and wakes up, then if no wakeup panel is defined, it will return to the home panel. If defined, it will return to the defined panel.
If no sleep occured but page was changed, it will return to the last active panel.
Only one panel can be a wakeup panel
wakeup_panel: true
unlock_code
string
unlock_code: "1234"
Panels can be locked with a code. If a unlock_code is set, the panel will be only accessible after entering the unlock code.
HAUIConfigEntity
is used internally to provide access to the entity from the config.
Basic values:
entity
the entity id (ex. sensor.temperature)name
name override, a default entity name will be used if not setvalue
value override, a default entity value will be used if not seticon
icon override, a default entity icon will be used if not setcolor
color override, a default entity color will be used if not setstate
state override, by default state will be used
the name, value, icon and color can also contain homeassistant template code. These values can contain mdi:
icons which will be replaced by its unicode representations.
haui_entity.get_state()
The state of the entity. By default, the state will be used. It is possible to override the state value by defining a state in config. If a string is set, the entity attribute with that name will be used. If a list is provided, the list values are being used as keys to get the state value from attributes.
# use attribute forecast condition as state of a weather entity
- entity: weather.home
state: ["forecast", 1, "condition"]
# use attribute temperature as state
- entity: weather.home
state: "temperature"
haui_entity.get_name()
The name of the entity. The name to be returned can be configured in different ways. By default it will return a value based on the entity. Either name or friendly name will be returned.
If a string is provided, this will be used as the name.
If a dict is provided and the entity state matches the dict key, then this name will be returned.
Accepts:
-
dict
:state: value assignment based on current entity state
- entity: switch.example_entity name: on: "name x" off: "name y"
-
str
:name to use
name: Name
haui_entity.get_value()
The entity value to display. The value to be returned can be configured in different ways. By default it will return a value based on entity state and type.
It is possible to override the value in the config of the entity.
If a string is provided, this will be used as a value.
If a dict is provided and the entity state matches the dict key, then this value will be returned.
Accepts:
-
dict
:state: value assignment based on current entity state
value: on: value x off: value y
-
str
:value to use
value: Text
haui_entity.get_icon()
name, value, icon and color can also be templated. The value needs to start with template:
template:
home assistant template
-
dict
:state: icon assignment based on current entity state
icon: on: "icon_name_x" off: "icon_name_y"
-
str
:icon to use
icon: "icon_name"
haui_entity.get_color()
-
dict
:state: color assignment based on current entity state
Note: Use quotes for on and off to not prevent yaml to be interpreted as boolean.
color: "on": [255, 255, 255] "off": "6339"
-
list
,tuple
:color to use as list with rgb values
color: [255, 255, 255]
-
str
,int
:color to use as rgb565 number
color: "6339" color: 6339
Internal entities begin with a keyword followed by :
or just the keyword.
- entity: skip
- entity: text:Text to use as value
...
- entity: navigate:key
-
skip
The entity should be skipped. This is the same as
entity: null
- entity: "skip" - entity: skip ... - entity: null
-
text
Use the text instead of an entity, the text is available as the entity value
text:Text to use
- entity: "text:Text to use"
-
navigate
Navigate to the panel with the key
navigate:key
- entity: "navigate:key"
-
action
Action to execute
Pass parameters using
action_data
- entity: "action:action_to_call" action_data: val: x
popup_key
string
popup_key: popup_media_player
A different than the default popup can be opened when executing by
setting popup_key
to the panel key to open.