Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5bf810ad5a | ||
|
|
a9576adf2f | ||
|
|
470a3d5d9e | ||
|
|
780f61d1c7 | ||
|
|
7cbbbc5b36 | ||
|
|
e01b23640c | ||
|
|
964be86c5d | ||
|
|
8b37b3b669 |
@@ -16,7 +16,7 @@ Or an TypeScript on your ioBroker Instance in case you are an ioBroker User.
|
||||
|
||||
NsPanel needs to be flashed with Tasmota (or upcoming with ESPHome)
|
||||
|
||||

|
||||

|
||||
|
||||
## Features
|
||||
|
||||
|
||||
@@ -80,8 +80,8 @@ class LuiBackendConfig(object):
|
||||
'locale': "en_US",
|
||||
'timeFormat': "%H:%M",
|
||||
'dateFormatBabel': "full",
|
||||
'dateAdditonalTemplate': "",
|
||||
'timeAdditonalTemplate': "",
|
||||
'dateAdditionalTemplate': "",
|
||||
'timeAdditionalTemplate': "",
|
||||
'dateFormat': "%A, %d. %B %Y",
|
||||
'cards': [{
|
||||
'type': 'cardEntities',
|
||||
|
||||
@@ -42,7 +42,7 @@ class LuiPagesGen(object):
|
||||
|
||||
def update_time(self, kwargs):
|
||||
time = datetime.datetime.now().strftime(self._config.get("timeFormat"))
|
||||
addTemplate = self._config.get("timeAdditonalTemplate")
|
||||
addTemplate = self._config.get("timeAdditionalTemplate")
|
||||
addTimeText = self._ha_api.render_template(addTemplate)
|
||||
self._send_mqtt_msg(f"time~{time}~{addTimeText}")
|
||||
|
||||
@@ -55,7 +55,7 @@ class LuiPagesGen(object):
|
||||
dateformat = self._config.get("dateFormat")
|
||||
date = datetime.datetime.now().strftime(dateformat)
|
||||
|
||||
addTemplate = self._config.get("dateAdditonalTemplate")
|
||||
addTemplate = self._config.get("dateAdditionalTemplate")
|
||||
addDateText = self._ha_api.render_template(addTemplate)
|
||||
self._send_mqtt_msg(f"date~{date}{addDateText}")
|
||||
|
||||
@@ -234,7 +234,7 @@ class LuiPagesGen(object):
|
||||
unit_of_measurement = entity.attributes.get("unit_of_measurement", "")
|
||||
value = entity.state + " " + unit_of_measurement
|
||||
if cardType == "cardGrid" and entityType == "sensor":
|
||||
icon_id = entity.state[:4]
|
||||
icon_id = entity.state[:3]
|
||||
if icon_id[-1] == ".":
|
||||
icon_id = icon_id[:-1]
|
||||
else:
|
||||
|
||||
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 985 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 5.8 KiB |
@@ -16,4 +16,4 @@ key | optional | type | default | description
|
||||
`title` | True | string | `None` | Title of the Page
|
||||
`entity` | False | string | `None` | contains the entity of the current card
|
||||
`key` | True | string | `None` | Used by navigate items
|
||||
`alarmControl` | True | complex | `None` | overwrites the action executed on pressing the left bottom icon, by default this button is used to show a list of open sensors on a failed attempt to arm.
|
||||
`mediaControl` | True | complex | `None` | overwrites the action executed on pressing the left upper icon (red circle), icon is showing the current type of media and cannot be changed
|
||||
@@ -62,8 +62,8 @@ key | optional | type | default | description
|
||||
`locale` | True | string | `en_US` | Used by babel to determinante Date format on screensaver, also used for localization.
|
||||
`dateFormatBabel` | True | string | `full` | formatting options on https://babel.pocoo.org/en/latest/dates.html?highlight=name%20of%20day#date-fields
|
||||
`timeFormat` | True | string | `%H:%M` | Time Format on screensaver. Substring after `?` is displayed in a seperate smaller textbox. Useful for 12h time format with AM/PM <pre>`"%I:%M ?%p"`</pre>
|
||||
`dateAdditonalTemplate` | True | string | `""` | Addional Text dispayed after Date, can contain a Homeassistant Template Example `" - {{ states('sun.sun') }}"`
|
||||
`timeAdditonalTemplate` | True | string | `""` | Addional Text dispayed below Time, can contain a Homeassistant Template
|
||||
`dateAdditionalTemplate` | True | string | `""` | Addional Text dispayed after Date, can contain a Homeassistant Template Example `" - {{ states('sun.sun') }}"`
|
||||
`timeAdditionalTemplate` | True | string | `""` | Addional Text dispayed below Time, can contain a Homeassistant Template
|
||||
`dateFormat` | True | string | `%A, %d. %B %Y` | date format used if babel is not installed
|
||||
`cards` | False | complex | | configuration for cards that are displayed on panel; see docs for cards
|
||||
`screensaver` | True | complex | | configuration for screensaver; see docs for screensaver
|
||||
|
||||
@@ -36,7 +36,7 @@ It is also possible to configure different icon overwrites per state:
|
||||
"off": mdi:lightbulb
|
||||
```
|
||||
|
||||
# Hide item based on state
|
||||
## Hide item based on state
|
||||
|
||||
This sensor will only be shown on the card if it's state is equal to `off`
|
||||
|
||||
|
||||
BIN
docs/img/card-alarm.png
Normal file
|
After Width: | Height: | Size: 8.0 KiB |
BIN
docs/img/card-media.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
docs/img/card-qr.png
Normal file
|
After Width: | Height: | Size: 5.9 KiB |