add input_text to entities page

This commit is contained in:
Johannes
2022-04-20 20:29:41 +02:00
parent d9016c4df4
commit 2d5e012a4f
2 changed files with 5 additions and 1 deletions

View File

@@ -16,7 +16,7 @@ Content of the screen is controlled by a AppDaemon Python Script installed on yo
## Features ## Features
- Entities Page with support for cover, switch, input_boolean, binary_sensor, sensor, button, number, scenes, script, input_button and light - Entities Page with support for cover, switch, input_boolean, binary_sensor, sensor, button, number, scenes, script, input_button and light, input_text (read-only)
- Grid Page with support for cover, switch, input_boolean, button, scenes, and light - Grid Page with support for cover, switch, input_boolean, button, scenes, and light
- Detail Pages for Lights (Brightness, Temperature and Color of the Light) and for Covers (Position) - Detail Pages for Lights (Brightness, Temperature and Color of the Light) and for Covers (Position)
- Thermostat Page - Thermostat Page

View File

@@ -174,6 +174,10 @@ class LuiPagesGen(object):
min_v = entity.attributes.get("min", 0) min_v = entity.attributes.get("min", 0)
max_v = entity.attributes.get("max", 100) max_v = entity.attributes.get("max", 100)
return f"~number~{entityId}~{icon_id}~17299~{name}~{entity.state}|{min_v}|{max_v}" return f"~number~{entityId}~{icon_id}~17299~{name}~{entity.state}|{min_v}|{max_v}"
if entityType == "input_text":
icon_id = get_icon_id_ha("input_text", overwrite=icon)
value = entity.state
return f"~text~{entityId}~{icon_id}~17299~{name}~{value}"
return f"~text~{entityId}~{get_icon_id('alert-circle-outline')}~17299~error~" return f"~text~{entityId}~{get_icon_id('alert-circle-outline')}~17299~error~"
def generate_entities_page(self, navigation, heading, items): def generate_entities_page(self, navigation, heading, items):