From: Giorgio Ravera Date: Fri, 27 Dec 2019 11:32:35 +0000 (+0100) Subject: Added Shelly 1 to Living Room X-Git-Url: http://git.giorgioravera.it/?a=commitdiff_plain;h=cb5a4682b293363ff714f42c3bb9ab2c9f9511ae;p=homeassistant.git Added Shelly 1 to Living Room --- diff --git a/components/google_assistant/home_assistant.yaml b/components/google_assistant/home_assistant.yaml index 89dd78e5..427bcef9 100644 --- a/components/google_assistant/home_assistant.yaml +++ b/components/google_assistant/home_assistant.yaml @@ -10,6 +10,10 @@ script.speech_status: name: Stato Casa expose: true room: Generale +script.speech_consumption: + name: Consumo Casa + expose: true + room: Generale script.homeassistant_restart: name: Riavvia Homeassistant expose: true diff --git a/components/google_assistant/light.yaml b/components/google_assistant/light.yaml index 1f8bc8a8..d6fba7a0 100644 --- a/components/google_assistant/light.yaml +++ b/components/google_assistant/light.yaml @@ -8,6 +8,9 @@ light.luce_corridoio: light.luce_cucina: expose: true room: Cucina +light.luce_sala: + expose: true + room: Sala light.luce_divano: expose: true room: Sala diff --git a/customizations/speech_engine.yaml b/customizations/speech_engine.yaml index 35316aca..b0f84647 100644 --- a/customizations/speech_engine.yaml +++ b/customizations/speech_engine.yaml @@ -4,6 +4,7 @@ script.speech_engine: icon: mdi:text-to-speech - script.speech_status: icon: mdi:voice +script.speech_consumption: + icon: mdi:power-plug diff --git a/group/lights.yaml b/group/lights.yaml index 291df911..9945e8e3 100644 --- a/group/lights.yaml +++ b/group/lights.yaml @@ -9,6 +9,7 @@ lights: entities: - light.luce_cucina - light.luce_corridoio + - light.luce_sala - light.luce_divano - light.luce_bagno - light.luce_specchio diff --git a/group/lights_livingroom.yaml b/group/lights_livingroom.yaml index 4c3fe8db..0969e595 100644 --- a/group/lights_livingroom.yaml +++ b/group/lights_livingroom.yaml @@ -7,5 +7,6 @@ lights_livingroom: view: true icon: mdi:lightbulb entities: + - light.luce_sala - light.luce_divano - - light.luce_divano_bianca +# - light.luce_divano_bianca diff --git a/group/shelly.yaml b/group/shelly.yaml index dcb49953..8f7ce525 100644 --- a/group/shelly.yaml +++ b/group/shelly.yaml @@ -16,6 +16,7 @@ shelly: - sensor.shelly7_status - sensor.shelly8_status - sensor.shelly9_status + - sensor.shelly10_status - sensor.shellybulb_status - sensor.shellyem_status - sensor.shellyplugs_status diff --git a/light/all.yaml b/light/all.yaml index fd3b0e1b..7ffa05b5 100644 --- a/light/all.yaml +++ b/light/all.yaml @@ -7,6 +7,7 @@ entities: - light.luce_corridoio - light.luce_cucina + - light.luce_sala - light.luce_divano - light.luce_bagno - light.luce_specchio diff --git a/light/sala.yaml b/light/sala.yaml index f22477dc..19649c40 100644 --- a/light/sala.yaml +++ b/light/sala.yaml @@ -1,5 +1,19 @@ ###################################################################### -# Living Room Light (Color) +# Living Room Light +###################################################################### + +- platform: mqtt + name: Luce Sala + command_topic: "shellies/shelly1-C426F9/relay/0/command" + state_topic: "shellies/shelly1-C426F9/relay/0" + payload_on: "on" + payload_off: "off" + retain: false + qos: 0 + optimistic: false + +###################################################################### +# Living Room Couch Light (Color) ###################################################################### - platform: mqtt @@ -87,7 +101,7 @@ optimistic: false ###################################################################### -# Living Room Light (White) +# Living Room Couch Light (White) ###################################################################### #- platform: mqtt @@ -135,10 +149,10 @@ friendly_name: "Luci Sala" turn_on: service: light.turn_on - entity_id: "light.luce_divano" + entity_id: "light.luce_sala, light.luce_divano" turn_off: service: light.turn_off - entity_id: "light.luce_divano" + entity_id: "light.luce_sala, light.luce_divano" value_template: >- {% if is_state('light.luce_divano', 'on') or is_state('light.luce_divano_bianca', 'on') %} on diff --git a/script/speech_engine.yaml b/script/speech_engine.yaml index f83dc07b..3499e159 100644 --- a/script/speech_engine.yaml +++ b/script/speech_engine.yaml @@ -99,6 +99,11 @@ speech_engine: {%- endfor %} {%- endmacro -%} + {# Consumption Status #} + {%- macro status_consumption() -%} + "Il consumo istantaneo è pari a {{ states.sensor.potenza_istantanea.state }} watt" + {%- endmacro -%} + {# Car Status #} {%- macro status_car() -%} {% if is_state('device_tracker.wdd1760081v167576', 'Casa') %} @@ -171,6 +176,8 @@ speech_engine: {{ status_lights() }} {{ status_covers() }} + + {{ status_consumption() }} {% endif %} @@ -204,3 +211,19 @@ speech_status: data: enable_greeting: 1 enable_status: 1 + +###################################################################### +# Speech Consumption +# +# Operations: +# - script.speech_engine +###################################################################### + +speech_consumption: + alias: Consumo Energetico + sequence: + - service: script.speech_engine + data_template: + language: 'it' + message: >- + "Il consumo istantaneo è pari a {{ states.sensor.potenza_istantanea.state }} watt" diff --git a/shell_scripts/shelly_reboot.sh b/shell_scripts/shelly_reboot.sh index 2be5768c..78ce1aab 100755 --- a/shell_scripts/shelly_reboot.sh +++ b/shell_scripts/shelly_reboot.sh @@ -13,6 +13,7 @@ SHELLY_ID=( shelly7.giorgioravera.it shelly8.giorgioravera.it shelly9.giorgioravera.it + shelly10.giorgioravera.it shellybulb.giorgioravera.it shellyem.giorgioravera.it shellyplugs.giorgioravera.it diff --git a/shell_scripts/shelly_upgrade.sh b/shell_scripts/shelly_upgrade.sh index 644afa9b..c0ebeebd 100755 --- a/shell_scripts/shelly_upgrade.sh +++ b/shell_scripts/shelly_upgrade.sh @@ -11,6 +11,7 @@ SHELLY_ID=( shellyswitch-559C49 shelly1-24D1EE shelly1-93B27D + shelly1-C426F9 shellyswitch25-7457D8 shelly1-59E18C shelly1-24D1A8 diff --git a/shell_scripts/shelly_version.sh b/shell_scripts/shelly_version.sh index 0eaa0b7c..80ec53ec 100755 --- a/shell_scripts/shelly_version.sh +++ b/shell_scripts/shelly_version.sh @@ -13,6 +13,7 @@ SHELLY_ID=( shelly7.giorgioravera.it shelly8.giorgioravera.it shelly9.giorgioravera.it + shelly7.giorgioravera.it shellybulb.giorgioravera.it shellyem.giorgioravera.it shellyplugs.giorgioravera.it diff --git a/ui-lovelace.yaml b/ui-lovelace.yaml index 76114d17..62239565 100644 --- a/ui-lovelace.yaml +++ b/ui-lovelace.yaml @@ -47,9 +47,9 @@ views: state_image: "on": /local/images/rooms/sala_on.jpg "off": /local/images/rooms/sala_off.jpg - entity: light.luce_divano - #entity: group.lights_livingroom + entity: group.lights_livingroom entities: + - light.luce_sala - light.luce_divano #- light.luce_divano_bianca - cover.tapparella_sala @@ -73,8 +73,7 @@ views: state_image: "on": /local/images/rooms/bagno_on.jpg "off": /local/images/rooms/bagno_off.jpg - entity: light.luce_bagno - #entity: group.lights_bathroom + entity: group.lights_bathroom entities: - light.luce_bagno - light.luce_specchio @@ -125,6 +124,7 @@ views: show_header_toggle: false entities: - script.speech_status + - script.speech_consumption - automation.risveglio_giorgio - type: entities @@ -142,6 +142,7 @@ views: badges: - light.luce_cucina - light.luce_corridoio + - light.luce_sala - light.luce_divano - light.luce_bagno - light.luce_specchio @@ -156,6 +157,7 @@ views: - light.luce_cucina - light.luce_corridoio - light.luci_sala + - light.luce_sala - light.luce_divano #- light.luce_divano_bianca - light.luci_bagno