From b93cb395d4769fbacc24d690e4a048b92ba3b81a Mon Sep 17 00:00:00 2001 From: "eelcob@hotmail.com" Date: Wed, 7 Apr 2021 10:12:15 +0200 Subject: [PATCH 1/9] Add support for graph type in the room-page_entities --- .../lovelace/views/main/rooms/room.yaml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/custom_components/dwains_dashboard/lovelace/views/main/rooms/room.yaml b/custom_components/dwains_dashboard/lovelace/views/main/rooms/room.yaml index 5c0e6ba3..2b8e94e7 100644 --- a/custom_components/dwains_dashboard/lovelace/views/main/rooms/room.yaml +++ b/custom_components/dwains_dashboard/lovelace/views/main/rooms/room.yaml @@ -862,9 +862,15 @@ item_classes: 'col-xs-12 col-sm-12 col-md-12 col-lg-12' {% endif %} {% for more_entity in room["page_entities"]["entities"] %} - - type: custom:button-card - entity: {{ more_entity["entity"] }} - template: room_more_entity + {% if more_entity["type"] and more_entity["type"] == 'graph' %} + - type: sensor + entity: {{ more_entity["entity"] }} + graph: line + {% else %} + - type: custom:button-card + entity: {{ more_entity["entity"] }} + template: room_more_entity + {% endif %} {% if more_entity["entity"].split('.')[0] in ('switch', 'light') %} tap_action: action: toggle From 35743c1f0a3e783f181017db74fa5fef31ee8b9a Mon Sep 17 00:00:00 2001 From: Pavol Holes <35877348+pavolholes@users.noreply.github.com> Date: Thu, 15 Apr 2021 12:47:17 +0200 Subject: [PATCH 2/9] Create sk.yaml --- .../lovelace/translations/sk.yaml | 117 ++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 custom_components/dwains_dashboard/lovelace/translations/sk.yaml diff --git a/custom_components/dwains_dashboard/lovelace/translations/sk.yaml b/custom_components/dwains_dashboard/lovelace/translations/sk.yaml new file mode 100644 index 00000000..7c6c9bd1 --- /dev/null +++ b/custom_components/dwains_dashboard/lovelace/translations/sk.yaml @@ -0,0 +1,117 @@ +# Translation by pavolholes + +sk: + greetings: + good_morning: 'Dobré Ráno' + good_afternoon: 'Dobré Popoludnie' + good_evening: 'Dobrý Večer' + + house_information: + title: 'Informácie o domove' + favorites: 'Obľúbené' + activity: 'Aktivity (Dvere, okná, pohyb)' + + motion: + title: 'Pohyb' + title_plural: 'Pohyby' + + light: + title_plural: 'Svetlá' + + door: + title: 'Dvere' + title_plural: 'Dverí' + + window: + title: 'Okno' + title_plural: 'Okná' + + climate: + title: 'Teplota' + title_plural: 'Teploty' + inside: 'vnútri' + outside: 'Vonku' + idle: 'nečinný' + heating: 'Ohrev na' + off_text: 'Vypnuté' + auto: 'Program' + heat: 'Ohrev' + cool: 'Chladenie' + heat_cool: 'Ohrev/Chladenie' + dry: 'Suchý' + fan_only: 'Iba ventilátor' + this_room: 'Táto izba' + temperature: 'Teplota' + humidity: 'Vlhkosť' + + cover: + title_plural: 'Kryty' + + device: + title_plural: 'Zariadenia' + + safety: + title_plural: 'Bezpečnostné prvky' + + media_player: + title_plural: 'Prehrávače' + + vacuum: + title: 'Vysávač' + title_plural: 'Vysávače' + + plant: + title_plural: 'Rastliny' + + home: + title: 'Prehľad' + + rooms: + title: 'Miestnosti' + + all_lights: + title: 'Všetky svetlá' + + scenes: + title: 'Scény' + not_defined: 'Žiadne scény nie sú definované' + + cameras: + title: 'Kamery' + not_defined: 'Žiadne kamery nie sú definované' + + more_page: + title: 'Viac' + house_info: 'Info o domácnosti' + house_data: + title: 'Dáta domácnosti' + all_sensors: 'Všetky senzory' + all_batteries: 'Všetky batérie' + config: 'Nastavenia' + developer_tools: 'Vývojárske nástroje' + settings: + title: 'Nastavenie témy' + reload_configuration: 'Obnoviť nastavenie témy' + theme_docs: 'Dokumentácia témy' + support_paypal: 'Podporiť/Darovať pomocu PayPal' + buy_coffee: 'Kúp mi kávu' + by: 'Od' + version: 'Verzia' + update_available: 'Je dostupná aktualizácia pre Dwains Theme!' + more_page_addons: 'Viac doplnkov' + + more_entities: + title: 'Viac objektov' + + lock: + title_plural: 'Zámky' + + alarm: + title: 'Alarm' + + weather: + title: 'Počasie' + + vibration: + title: 'Vibrácie' + title_plural: 'Vibračné Senzory' From ab8ea60d70e38066e395236ae49f1557fced7f35 Mon Sep 17 00:00:00 2001 From: Pavol Holes <35877348+pavolholes@users.noreply.github.com> Date: Thu, 15 Apr 2021 13:01:29 +0200 Subject: [PATCH 3/9] Update config_flow.py added Slovak to LANGUAGES --- custom_components/dwains_dashboard/config_flow.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/custom_components/dwains_dashboard/config_flow.py b/custom_components/dwains_dashboard/config_flow.py index ab840806..21a8299b 100755 --- a/custom_components/dwains_dashboard/config_flow.py +++ b/custom_components/dwains_dashboard/config_flow.py @@ -19,6 +19,7 @@ "Romanian", "Swedish", "Dutch", + "Slovak" ] SIDEPANEL_TITLE = "sidepanel_title" SIDEPANEL_ICON = "sidepanel_icon" @@ -67,4 +68,4 @@ async def async_step_init(self, user_input=None): return self.async_show_form( step_id="init", data_schema=vol.Schema(schema) - ) \ No newline at end of file + ) From bab816a165832ac0c36e4faf5ae3a7fd67c31004 Mon Sep 17 00:00:00 2001 From: Pavol Holes <35877348+pavolholes@users.noreply.github.com> Date: Thu, 15 Apr 2021 13:02:10 +0200 Subject: [PATCH 4/9] Update process_yaml.py added Slovak to LANGUAGES --- custom_components/dwains_dashboard/process_yaml.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/custom_components/dwains_dashboard/process_yaml.py b/custom_components/dwains_dashboard/process_yaml.py index 5c177e68..c7947d78 100755 --- a/custom_components/dwains_dashboard/process_yaml.py +++ b/custom_components/dwains_dashboard/process_yaml.py @@ -40,7 +40,8 @@ def fromjson(value): "Norwegian": "no", "Romanian": "ro", "Swedish": "se", - "Dutch": "nl" + "Dutch": "nl", + "Slovak": "sk" } def load_yamll(fname, secrets = None, args={}): From 7dd2a2fd800fa19a77eefeb07a717138d940515d Mon Sep 17 00:00:00 2001 From: "eelcob@hotmail.com" Date: Sun, 25 Apr 2021 10:33:10 +0200 Subject: [PATCH 5/9] make lights button in main menu configurable --- .../lovelace/views/main/02.lights.yaml | 351 +++++++++--------- 1 file changed, 179 insertions(+), 172 deletions(-) diff --git a/custom_components/dwains_dashboard/lovelace/views/main/02.lights.yaml b/custom_components/dwains_dashboard/lovelace/views/main/02.lights.yaml index 6737a79e..797a0b5f 100644 --- a/custom_components/dwains_dashboard/lovelace/views/main/02.lights.yaml +++ b/custom_components/dwains_dashboard/lovelace/views/main/02.lights.yaml @@ -1,172 +1,179 @@ -# dwains_dashboard - -- path: lights - icon: {{ _dd_icons.menu_lights|default('mdi:lightbulb-group') }} - title: {{ _dd_trans.all_lights.title }} - panel: true - cards: - - type: custom:dwains-wrapper-card - css: | - max-width: 1465px; - padding-bottom: 50px; - margin: 0 auto; - font-family: "Open Sans", sans-serif !important; - card: - type: vertical-stack - cards: - #Header with all lights on/off button - - type: custom:dwains-header-card - title: {{ _dd_trans.all_lights.title }} - card: - type: vertical-stack - cards: - - type: custom:button-card - template: lights_header_all_lights_toggle - icon: "{{ _dd_icons.light_on|default('mdi:lightbulb') }}" - tap_action: - haptic: light - action: call-service - service: homeassistant.turn_off - service_data: - entity_id: - #Get all lights - {% for room in _dd_config.rooms %} - {% if room["light"] %} - - {{ room["light"] }} - {% endif %} - {% endfor %} - styles: - card: - - padding-top: 16px - - display: > - [[[ - var onLights = 0; - - {% for room in _dd_config.rooms %} - //Do some things for the lights - {% if room["light"] %} - {% if room["light"].split('.')[0] == 'light' or room["light"].split('.')[0] == 'switch' %} - //This room has only 1 light - if(states['{{ room["light"] }}'] && states['{{ room["light"] }}'].state == 'on') { - onLights++; - } - {% else %} - //This room has group of lights - if(states['{{ room["light"] }}']){ - states['{{ room["light"] }}'].attributes['entity_id'].forEach(function(entity){ - if(states[entity] && states[entity].state == 'on'){ - onLights++; - } - }); - } - {% endif %} - {% endif %} - {% endfor %} - if(onLights == 0){ - return 'none'; - } else { - return 'block'; - } - ]]] - - type: custom:button-card - template: lights_header_all_lights_toggle - icon: "{{ _dd_icons.light_off|default('mdi:lightbulb-outline') }}" - tap_action: - haptic: light - action: call-service - service: homeassistant.turn_on - service_data: - entity_id: - #Get all lights - {% for room in _dd_config.rooms %} - {% if room["light"] %} - - {{ room["light"] }} - {% endif %} - {% endfor %} - styles: - card: - - display: > - [[[ - var onLights = 0; - - {% for room in _dd_config.rooms %} - //Do some things for the lights - {% if room["light"] %} - {% if room["light"].split('.')[0] == 'light' or room["light"].split('.')[0] == 'switch' %} - //This room has only 1 light - if(states['{{ room["light"] }}'] && states['{{ room["light"] }}'].state == 'on') { - onLights++; - } - {% else %} - //This room has group of lights - if(states['{{ room["light"] }}']){ - states['{{ room["light"] }}'].attributes['entity_id'].forEach(function(entity){ - if(states[entity] && states[entity].state == 'on'){ - onLights++; - } - }); - } - {% endif %} - {% endif %} - {% endfor %} - if(onLights == 0){ - return 'block'; - } else { - return 'none'; - } - ]]] - - #Start for all lights page - #All lights - - type: custom:dwains-flexbox-card - padding: true - items_classes: 'col-xs-12 col-sm-6 col-md-3 col-lg-3' - cards: - {% for room in _dd_config.rooms %} - {% if room["light"] %} - - type: vertical-stack - cards: - #Heading - - type: custom:button-card - entity: {{ room["light"] }} - name: {{ room["name"] }} - template: partials_heading - tap_action: - action: more-info - double_tap_action: - action: toggle - {% if room["light"].split('.')[0] == 'light' or room["light"].split('.')[0] == 'switch' %} - # this room has only 1 light (light or switch entity) - - type: horizontal-stack - cards: - - type: custom:button-card - template: room_light - entity: {{ room["light"] }} - {% if room["light"].split('.')[0] == 'light' %} - hold_action: - action: more-info - double_tap_action: - action: more-info - {% endif %} - {% else %} - # this room has group of lights - - type: custom:dwains-auto-entities-card - filter: - include: - - group: {{ room["light"] }} - options: - type: custom:button-card - template: room_light - hold_action: - action: more-info - double_tap_action: - action: more-info - sort: - method: name - ignore_case: true - card: - type: custom:dwains-flexbox-card - items_classes: 'col-xs-12' - {% endif %} - {% endif %} - {% endfor %} \ No newline at end of file +# dwains_dashboard + +- path: lights + {% if _dd_config.lights %} + {% if _dd_config.lights["main_menu"] and _dd_config.lights["main_menu"] == 'false' %} + visible: false + {% else %} + visible: true + {% endif %} + {% endif %} + icon: {{ _dd_icons.menu_lights|default('mdi:lightbulb-group') }} + title: {{ _dd_trans.all_lights.title }} + panel: true + cards: + - type: custom:dwains-wrapper-card + css: | + max-width: 1465px; + padding-bottom: 50px; + margin: 0 auto; + font-family: "Open Sans", sans-serif !important; + card: + type: vertical-stack + cards: + #Header with all lights on/off button + - type: custom:dwains-header-card + title: {{ _dd_trans.all_lights.title }} + card: + type: vertical-stack + cards: + - type: custom:button-card + template: lights_header_all_lights_toggle + icon: "{{ _dd_icons.light_on|default('mdi:lightbulb') }}" + tap_action: + haptic: light + action: call-service + service: homeassistant.turn_off + service_data: + entity_id: + #Get all lights + {% for room in _dd_config.rooms %} + {% if room["light"] %} + - {{ room["light"] }} + {% endif %} + {% endfor %} + styles: + card: + - padding-top: 16px + - display: > + [[[ + var onLights = 0; + + {% for room in _dd_config.rooms %} + //Do some things for the lights + {% if room["light"] %} + {% if room["light"].split('.')[0] == 'light' or room["light"].split('.')[0] == 'switch' %} + //This room has only 1 light + if(states['{{ room["light"] }}'] && states['{{ room["light"] }}'].state == 'on') { + onLights++; + } + {% else %} + //This room has group of lights + if(states['{{ room["light"] }}']){ + states['{{ room["light"] }}'].attributes['entity_id'].forEach(function(entity){ + if(states[entity] && states[entity].state == 'on'){ + onLights++; + } + }); + } + {% endif %} + {% endif %} + {% endfor %} + if(onLights == 0){ + return 'none'; + } else { + return 'block'; + } + ]]] + - type: custom:button-card + template: lights_header_all_lights_toggle + icon: "{{ _dd_icons.light_off|default('mdi:lightbulb-outline') }}" + tap_action: + haptic: light + action: call-service + service: homeassistant.turn_on + service_data: + entity_id: + #Get all lights + {% for room in _dd_config.rooms %} + {% if room["light"] %} + - {{ room["light"] }} + {% endif %} + {% endfor %} + styles: + card: + - display: > + [[[ + var onLights = 0; + + {% for room in _dd_config.rooms %} + //Do some things for the lights + {% if room["light"] %} + {% if room["light"].split('.')[0] == 'light' or room["light"].split('.')[0] == 'switch' %} + //This room has only 1 light + if(states['{{ room["light"] }}'] && states['{{ room["light"] }}'].state == 'on') { + onLights++; + } + {% else %} + //This room has group of lights + if(states['{{ room["light"] }}']){ + states['{{ room["light"] }}'].attributes['entity_id'].forEach(function(entity){ + if(states[entity] && states[entity].state == 'on'){ + onLights++; + } + }); + } + {% endif %} + {% endif %} + {% endfor %} + if(onLights == 0){ + return 'block'; + } else { + return 'none'; + } + ]]] + + #Start for all lights page + #All lights + - type: custom:dwains-flexbox-card + padding: true + items_classes: 'col-xs-12 col-sm-6 col-md-3 col-lg-3' + cards: + {% for room in _dd_config.rooms %} + {% if room["light"] %} + - type: vertical-stack + cards: + #Heading + - type: custom:button-card + entity: {{ room["light"] }} + name: {{ room["name"] }} + template: partials_heading + tap_action: + action: more-info + double_tap_action: + action: toggle + {% if room["light"].split('.')[0] == 'light' or room["light"].split('.')[0] == 'switch' %} + # this room has only 1 light (light or switch entity) + - type: horizontal-stack + cards: + - type: custom:button-card + template: room_light + entity: {{ room["light"] }} + {% if room["light"].split('.')[0] == 'light' %} + hold_action: + action: more-info + double_tap_action: + action: more-info + {% endif %} + {% else %} + # this room has group of lights + - type: custom:dwains-auto-entities-card + filter: + include: + - group: {{ room["light"] }} + options: + type: custom:button-card + template: room_light + hold_action: + action: more-info + double_tap_action: + action: more-info + sort: + method: name + ignore_case: true + card: + type: custom:dwains-flexbox-card + items_classes: 'col-xs-12' + {% endif %} + {% endif %} + {% endfor %} From 03b0cd7845a8cfdec43bcda453b57f4a77b321aa Mon Sep 17 00:00:00 2001 From: "eelcob@hotmail.com" Date: Sun, 25 Apr 2021 10:38:47 +0200 Subject: [PATCH 6/9] don't remove linebreaks --- .../lovelace/views/main/02.lights.yaml | 342 +++++++++--------- 1 file changed, 171 insertions(+), 171 deletions(-) diff --git a/custom_components/dwains_dashboard/lovelace/views/main/02.lights.yaml b/custom_components/dwains_dashboard/lovelace/views/main/02.lights.yaml index 797a0b5f..4060b4ae 100644 --- a/custom_components/dwains_dashboard/lovelace/views/main/02.lights.yaml +++ b/custom_components/dwains_dashboard/lovelace/views/main/02.lights.yaml @@ -1,6 +1,6 @@ -# dwains_dashboard - -- path: lights +# dwains_dashboard + +- path: lights {% if _dd_config.lights %} {% if _dd_config.lights["main_menu"] and _dd_config.lights["main_menu"] == 'false' %} visible: false @@ -8,172 +8,172 @@ visible: true {% endif %} {% endif %} - icon: {{ _dd_icons.menu_lights|default('mdi:lightbulb-group') }} - title: {{ _dd_trans.all_lights.title }} - panel: true - cards: - - type: custom:dwains-wrapper-card - css: | - max-width: 1465px; - padding-bottom: 50px; - margin: 0 auto; - font-family: "Open Sans", sans-serif !important; - card: - type: vertical-stack - cards: - #Header with all lights on/off button - - type: custom:dwains-header-card - title: {{ _dd_trans.all_lights.title }} - card: - type: vertical-stack - cards: - - type: custom:button-card - template: lights_header_all_lights_toggle - icon: "{{ _dd_icons.light_on|default('mdi:lightbulb') }}" - tap_action: - haptic: light - action: call-service - service: homeassistant.turn_off - service_data: - entity_id: - #Get all lights - {% for room in _dd_config.rooms %} - {% if room["light"] %} - - {{ room["light"] }} - {% endif %} - {% endfor %} - styles: - card: - - padding-top: 16px - - display: > - [[[ - var onLights = 0; - - {% for room in _dd_config.rooms %} - //Do some things for the lights - {% if room["light"] %} - {% if room["light"].split('.')[0] == 'light' or room["light"].split('.')[0] == 'switch' %} - //This room has only 1 light - if(states['{{ room["light"] }}'] && states['{{ room["light"] }}'].state == 'on') { - onLights++; - } - {% else %} - //This room has group of lights - if(states['{{ room["light"] }}']){ - states['{{ room["light"] }}'].attributes['entity_id'].forEach(function(entity){ - if(states[entity] && states[entity].state == 'on'){ - onLights++; - } - }); - } - {% endif %} - {% endif %} - {% endfor %} - if(onLights == 0){ - return 'none'; - } else { - return 'block'; - } - ]]] - - type: custom:button-card - template: lights_header_all_lights_toggle - icon: "{{ _dd_icons.light_off|default('mdi:lightbulb-outline') }}" - tap_action: - haptic: light - action: call-service - service: homeassistant.turn_on - service_data: - entity_id: - #Get all lights - {% for room in _dd_config.rooms %} - {% if room["light"] %} - - {{ room["light"] }} - {% endif %} - {% endfor %} - styles: - card: - - display: > - [[[ - var onLights = 0; - - {% for room in _dd_config.rooms %} - //Do some things for the lights - {% if room["light"] %} - {% if room["light"].split('.')[0] == 'light' or room["light"].split('.')[0] == 'switch' %} - //This room has only 1 light - if(states['{{ room["light"] }}'] && states['{{ room["light"] }}'].state == 'on') { - onLights++; - } - {% else %} - //This room has group of lights - if(states['{{ room["light"] }}']){ - states['{{ room["light"] }}'].attributes['entity_id'].forEach(function(entity){ - if(states[entity] && states[entity].state == 'on'){ - onLights++; - } - }); - } - {% endif %} - {% endif %} - {% endfor %} - if(onLights == 0){ - return 'block'; - } else { - return 'none'; - } - ]]] - - #Start for all lights page - #All lights - - type: custom:dwains-flexbox-card - padding: true - items_classes: 'col-xs-12 col-sm-6 col-md-3 col-lg-3' - cards: - {% for room in _dd_config.rooms %} - {% if room["light"] %} - - type: vertical-stack - cards: - #Heading - - type: custom:button-card - entity: {{ room["light"] }} - name: {{ room["name"] }} - template: partials_heading - tap_action: - action: more-info - double_tap_action: - action: toggle - {% if room["light"].split('.')[0] == 'light' or room["light"].split('.')[0] == 'switch' %} - # this room has only 1 light (light or switch entity) - - type: horizontal-stack - cards: - - type: custom:button-card - template: room_light - entity: {{ room["light"] }} - {% if room["light"].split('.')[0] == 'light' %} - hold_action: - action: more-info - double_tap_action: - action: more-info - {% endif %} - {% else %} - # this room has group of lights - - type: custom:dwains-auto-entities-card - filter: - include: - - group: {{ room["light"] }} - options: - type: custom:button-card - template: room_light - hold_action: - action: more-info - double_tap_action: - action: more-info - sort: - method: name - ignore_case: true - card: - type: custom:dwains-flexbox-card - items_classes: 'col-xs-12' - {% endif %} - {% endif %} + icon: {{ _dd_icons.menu_lights|default('mdi:lightbulb-group') }} + title: {{ _dd_trans.all_lights.title }} + panel: true + cards: + - type: custom:dwains-wrapper-card + css: | + max-width: 1465px; + padding-bottom: 50px; + margin: 0 auto; + font-family: "Open Sans", sans-serif !important; + card: + type: vertical-stack + cards: + #Header with all lights on/off button + - type: custom:dwains-header-card + title: {{ _dd_trans.all_lights.title }} + card: + type: vertical-stack + cards: + - type: custom:button-card + template: lights_header_all_lights_toggle + icon: "{{ _dd_icons.light_on|default('mdi:lightbulb') }}" + tap_action: + haptic: light + action: call-service + service: homeassistant.turn_off + service_data: + entity_id: + #Get all lights + {% for room in _dd_config.rooms %} + {% if room["light"] %} + - {{ room["light"] }} + {% endif %} + {% endfor %} + styles: + card: + - padding-top: 16px + - display: > + [[[ + var onLights = 0; + + {% for room in _dd_config.rooms %} + //Do some things for the lights + {% if room["light"] %} + {% if room["light"].split('.')[0] == 'light' or room["light"].split('.')[0] == 'switch' %} + //This room has only 1 light + if(states['{{ room["light"] }}'] && states['{{ room["light"] }}'].state == 'on') { + onLights++; + } + {% else %} + //This room has group of lights + if(states['{{ room["light"] }}']){ + states['{{ room["light"] }}'].attributes['entity_id'].forEach(function(entity){ + if(states[entity] && states[entity].state == 'on'){ + onLights++; + } + }); + } + {% endif %} + {% endif %} + {% endfor %} + if(onLights == 0){ + return 'none'; + } else { + return 'block'; + } + ]]] + - type: custom:button-card + template: lights_header_all_lights_toggle + icon: "{{ _dd_icons.light_off|default('mdi:lightbulb-outline') }}" + tap_action: + haptic: light + action: call-service + service: homeassistant.turn_on + service_data: + entity_id: + #Get all lights + {% for room in _dd_config.rooms %} + {% if room["light"] %} + - {{ room["light"] }} + {% endif %} + {% endfor %} + styles: + card: + - display: > + [[[ + var onLights = 0; + + {% for room in _dd_config.rooms %} + //Do some things for the lights + {% if room["light"] %} + {% if room["light"].split('.')[0] == 'light' or room["light"].split('.')[0] == 'switch' %} + //This room has only 1 light + if(states['{{ room["light"] }}'] && states['{{ room["light"] }}'].state == 'on') { + onLights++; + } + {% else %} + //This room has group of lights + if(states['{{ room["light"] }}']){ + states['{{ room["light"] }}'].attributes['entity_id'].forEach(function(entity){ + if(states[entity] && states[entity].state == 'on'){ + onLights++; + } + }); + } + {% endif %} + {% endif %} + {% endfor %} + if(onLights == 0){ + return 'block'; + } else { + return 'none'; + } + ]]] + + #Start for all lights page + #All lights + - type: custom:dwains-flexbox-card + padding: true + items_classes: 'col-xs-12 col-sm-6 col-md-3 col-lg-3' + cards: + {% for room in _dd_config.rooms %} + {% if room["light"] %} + - type: vertical-stack + cards: + #Heading + - type: custom:button-card + entity: {{ room["light"] }} + name: {{ room["name"] }} + template: partials_heading + tap_action: + action: more-info + double_tap_action: + action: toggle + {% if room["light"].split('.')[0] == 'light' or room["light"].split('.')[0] == 'switch' %} + # this room has only 1 light (light or switch entity) + - type: horizontal-stack + cards: + - type: custom:button-card + template: room_light + entity: {{ room["light"] }} + {% if room["light"].split('.')[0] == 'light' %} + hold_action: + action: more-info + double_tap_action: + action: more-info + {% endif %} + {% else %} + # this room has group of lights + - type: custom:dwains-auto-entities-card + filter: + include: + - group: {{ room["light"] }} + options: + type: custom:button-card + template: room_light + hold_action: + action: more-info + double_tap_action: + action: more-info + sort: + method: name + ignore_case: true + card: + type: custom:dwains-flexbox-card + items_classes: 'col-xs-12' + {% endif %} + {% endif %} {% endfor %} From d964ab26ec87ef9ecb8c4f1b4d46a3311ff6c1f9 Mon Sep 17 00:00:00 2001 From: LRvdLinden <77990847+LRvdLinden@users.noreply.github.com> Date: Tue, 18 May 2021 10:54:19 +0200 Subject: [PATCH 7/9] Update room.yaml --- .../plugins/button-cards-templates/homepage/room.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/custom_components/dwains_dashboard/lovelace/plugins/button-cards-templates/homepage/room.yaml b/custom_components/dwains_dashboard/lovelace/plugins/button-cards-templates/homepage/room.yaml index 835bb68c..2ef370b5 100755 --- a/custom_components/dwains_dashboard/lovelace/plugins/button-cards-templates/homepage/room.yaml +++ b/custom_components/dwains_dashboard/lovelace/plugins/button-cards-templates/homepage/room.yaml @@ -25,6 +25,8 @@ homepage_room: - color: var(--dwains-theme-accent) - height: 50px - width: 50px + - primary: var(--dwains-theme-accent) + - secondary: var(--dwains-theme-primary) img_cell: - padding-top: 20px - padding-bottom: 5px @@ -47,4 +49,4 @@ homepage_room: - width: 40px - height: 40px - text-align: right - - color: var(--dwains-theme-grey) \ No newline at end of file + - color: var(--dwains-theme-grey) From 40265686ecbc59011bb43474a32da66ff9a14a8c Mon Sep 17 00:00:00 2001 From: LRvdLinden <77990847+LRvdLinden@users.noreply.github.com> Date: Tue, 18 May 2021 10:54:36 +0200 Subject: [PATCH 8/9] Update device.yaml --- .../plugins/button-cards-templates/homepage/device.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/custom_components/dwains_dashboard/lovelace/plugins/button-cards-templates/homepage/device.yaml b/custom_components/dwains_dashboard/lovelace/plugins/button-cards-templates/homepage/device.yaml index fc160f22..2f3b7e17 100755 --- a/custom_components/dwains_dashboard/lovelace/plugins/button-cards-templates/homepage/device.yaml +++ b/custom_components/dwains_dashboard/lovelace/plugins/button-cards-templates/homepage/device.yaml @@ -25,6 +25,8 @@ homepage_device: - color: var(--dwains-theme-accent) - height: 50px - width: 50px + - primary: var(--dwains-theme-accent) + - secondary: var(--dwains-theme-primary) img_cell: - padding-top: 20px - padding-bottom: 5px @@ -47,4 +49,4 @@ homepage_device: - width: 40px - height: 40px - text-align: right - - color: var(--dwains-theme-grey) \ No newline at end of file + - color: var(--dwains-theme-grey) From eb90550c9caa99564d93d4fbea1b24afb889a061 Mon Sep 17 00:00:00 2001 From: dtorner Date: Sun, 1 Aug 2021 10:05:40 +0200 Subject: [PATCH 9/9] Update es.yaml --- .../lovelace/translations/es.yaml | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/custom_components/dwains_dashboard/lovelace/translations/es.yaml b/custom_components/dwains_dashboard/lovelace/translations/es.yaml index 78723554..e23f95b9 100755 --- a/custom_components/dwains_dashboard/lovelace/translations/es.yaml +++ b/custom_components/dwains_dashboard/lovelace/translations/es.yaml @@ -2,12 +2,12 @@ es: greetings: - good_morning: "Buenos Días" - good_afternoon: "Buenas Tardes" - good_evening: "Buena Noches" + good_morning: "Buenos días" + good_afternoon: "Buenas tardes" + good_evening: "Buenas noches" house_information: - title: "Información de la Casa" + title: "Información de la casa" favorites: "Favoritos" activity: "Actividad (puertas, ventanas, movimiento)" @@ -29,10 +29,10 @@ es: climate: title: "Temperatura" title_plural: "Temperaturas" - inside: "adentro" - outside: "afuera" + inside: "Dentro" + outside: "Fuera" idle: "En espera" - heating: "Calentar a" + heating: "Calentando" off_text: "Apagado" auto: "Automático" heat: "Calentar" @@ -51,7 +51,7 @@ es: title_plural: "Dispositivos" safety: - title_plural: 'Safties' + title_plural: 'Seguridad' media_player: title_plural: "Reproductores multimedia" @@ -93,7 +93,7 @@ es: title: "Configuración de temas" reload_configuration: 'Recargar temas' theme_docs: "Lista de temas" - support_paypal: "Done con PayPal" + support_paypal: "Dona con PayPal" buy_coffee: "Cómprame un café" by: "Por" version: "Versión" @@ -107,11 +107,11 @@ es: title_plural: 'Cerraduras' alarm: - title: 'Alarm' + title: 'Alarma' vibration: - title: 'Vibration' - title_plural: "Vibration Sensors" + title: 'Vibración' + title_plural: "Sensores de vibración" weather: - title: 'Weather' \ No newline at end of file + title: 'Clima'