From a2c75ab131cb3271487fa464d179fd70c8449de9 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Sat, 7 Nov 2020 11:20:26 -0500 Subject: [PATCH] Reorginizing packages... --- config/groups.yaml | 1 + config/packages/appliances.yaml | 15 +++ config/packages/audio.yaml | 6 +- config/packages/daily.yaml | 38 +++++--- config/packages/halloween.yaml | 4 +- config/packages/lighting.yaml | 67 ++++++++++++- config/packages/notify.yaml | 4 +- config/packages/presence.yaml | 162 +++++++++++++++++--------------- config/packages/security.yaml | 38 +++++--- config/packages/space.yaml | 47 ++++----- config/packages/twitter.yaml | 4 +- config/packages/weather.yaml | 79 ++++++++++------ config/scenes.yaml | 14 +++ 13 files changed, 318 insertions(+), 161 deletions(-) diff --git a/config/groups.yaml b/config/groups.yaml index 03aa871..f08539e 100755 --- a/config/groups.yaml +++ b/config/groups.yaml @@ -7,6 +7,7 @@ Family: - person.jeffrey - person.katherine + House Conditions: - climate.first_floor - sensor.accurite_back_porch_temperature diff --git a/config/packages/appliances.yaml b/config/packages/appliances.yaml index 57f1cb6..368ffe2 100755 --- a/config/packages/appliances.yaml +++ b/config/packages/appliances.yaml @@ -114,6 +114,21 @@ automation: script: + appliances_on: + sequence: + - service: switch.turn_on + data: + entity_id: switch.box_fans + + appliances_off: + sequence: + - data: + entity_id: switch.incense + service: switch.turn_off + - data: + entity_id: switch.artemis + service: switch.turn_off + washer_finished_notification_audible: sequence: - delay: diff --git a/config/packages/audio.yaml b/config/packages/audio.yaml index ec0b354..53ffb80 100755 --- a/config/packages/audio.yaml +++ b/config/packages/audio.yaml @@ -13,9 +13,9 @@ # but if not you may need to modify the following section. # For more info on Media Players visit https://www.home-assistant.io/integrations/media_player/ # MODIFY this section as needed or comment it out completely if not needed. -media_player: - - platform: yamaha - host: 192.168.7.152 +# media_player: +# - platform: yamaha +# host: 192.168.7.152 ################################ # Media extractor is used for playing youtube audio. For more info ->https://www.home-assistant.io/integrations/media_extractor/ diff --git a/config/packages/daily.yaml b/config/packages/daily.yaml index 2249396..6d9480d 100755 --- a/config/packages/daily.yaml +++ b/config/packages/daily.yaml @@ -69,6 +69,20 @@ automation: entity_id: scene.skylar_room_prebed + - id: master_bedroom_lights_dim + alias: Master Bedroom lights dim + initial_state: true + trigger: + - platform: time + at: '22:30:00' + condition: + - condition: state + entity_id: input_boolean.vacation_mode + state: 'off' + action: + - service: scene.turn_on + entity_id: scene.master_bedroom_dim + - id: master_bedroom_lights_out alias: Master Bedroom lights out initial_state: true @@ -83,20 +97,6 @@ automation: - service: scene.turn_on entity_id: scene.master_bedroom_off - - id: master_bedroom_lights_out - alias: Master Bedroom lights out - initial_state: true - trigger: - - platform: time - at: '22:30:00' - condition: - - condition: state - entity_id: input_boolean.vacation_mode - state: 'off' - action: - - service: scene.turn_on - entity_id: scene.master_bedroom_dim - - id: master_bedroom_lights_on alias: Master Bedroom Lights On initial_state: true @@ -405,4 +405,12 @@ automation: 07:00 {% else %} 07:30 - {% endif %} \ No newline at end of file + {% endif %} + +script: + sunset_garage_open: + sequence: + - condition: state + entity_id: group.garage_doors + state: 'on' + - service: script.driveway_all_on \ No newline at end of file diff --git a/config/packages/halloween.yaml b/config/packages/halloween.yaml index f2867fb..21fd9e1 100755 --- a/config/packages/halloween.yaml +++ b/config/packages/halloween.yaml @@ -73,7 +73,7 @@ automation: - condition: template value_template: > {%- set event=states.calendar.holidays_in_united_states.attributes.message %} - {%- if event == 'Halloween' %} + {%- if event == 'Halloween' and states.calendar.holidays_in_united_states.state == 'on'%} true {%- endif -%} # If all conditions are true, then lets turn this thing on. @@ -260,4 +260,4 @@ script: # resource: !secret WA_HALLOWEEN # value_template: "{{ (value|replace(' days', '')) | int }}" # unit_of_measurement: Days -# scan_interval: 43200 +# scan_interval: 43200 \ No newline at end of file diff --git a/config/packages/lighting.yaml b/config/packages/lighting.yaml index b21f143..4edb111 100755 --- a/config/packages/lighting.yaml +++ b/config/packages/lighting.yaml @@ -58,14 +58,79 @@ automation: {{ [ "Looks like it is bright enough now, so I am turning off the inside lights.", "It is now bright enough to turn off the inside lights, so thats what I did. Just now. ", "There is enough natural light, so I am turning off the inside lights.", - "" + "Thanks to #homeassistant and an Aqara Sensor I know it is bright enought to turn off the inside lights." ] | random }} script: + + inside_all_off: + sequence: + - data: + entity_id: light.tower_lamp_4 + service: light.turn_off + - data: + entity_id: light.living_room_lamp + service: light.turn_off + - data: + entity_id: light.front_door_lamp + service: light.turn_off + - data: + entity_id: light.kitchen_cabinets + service: light.turn_off + - data: + entity_id: light.kitchen_cabinet_lights + service: light.turn_off + - entity_id: switch.fireplace_lights + service: switch.turn_off + - entity_id: switch.upstairs + service: switch.turn_off + - entity_id: light.jeff_lamp + service: light.turn_off + + inside_all_on: + sequence: + - service: scene.turn_on + entity_id: scene.normal_livingroom_lighting + - service: scene.turn_on + entity_id: scene.normal_kitchen_lighting + - service: switch.turn_on + entity_id: switch.fireplace_lights + - service: switch.turn_on + entity_id: switch.croft_light + - service: switch.turn_on + entity_id: switch.rail_lights + - service: scene.turn_on + entity_id: scene.jeff_light_on + driveway_on: + sequence: + - condition: state + entity_id: sun.sun + state: below_horizon + - data: + entity_id: switch.driveway_light + service: switch.turn_on + - data: + entity_id: light.side_door_light + service: light.turn_on + + driveway_off: + sequence: + - delay: + seconds: 120 + - condition: state + entity_id: binary_sensor.side_door + state: 'off' + - condition: state + entity_id: binary_sensor.garage_door + state: 'off' + - service: switch.turn_off + entity_id: switch.driveway_light + - service: light.turn_off + entity_id: light.side_door_light # Turn on Living Room Lights if sun is down or cloud coverage is above 70% livingroom_lamps_on: diff --git a/config/packages/notify.yaml b/config/packages/notify.yaml index bd76b39..3f56ebb 100755 --- a/config/packages/notify.yaml +++ b/config/packages/notify.yaml @@ -315,7 +315,7 @@ script: {% elif who == 'croft' %} .50 {% elif who == 'master_bedroom' %} - .99 + .50 {% elif who == 'studio' %} .30 {% elif who == 'all_google' %} @@ -817,7 +817,7 @@ script: 'I will be going as HAL 9000. The Pod Bay Doors are being installed today. I dare you to ask me to open them. ' ] | random }} {% elif states.sensor.halloween_countdown.state | int < 30 %} - There are only {{states.sensor.holiday_halloween.state}} days + There are only {{states.sensor.halloween_countdown.state}} days {{ [ 'until Halloween.', 'until Halloween. It might not be enough time. ', 'and counting until the best holiday ever.', diff --git a/config/packages/presence.yaml b/config/packages/presence.yaml index 7503385..f1a0438 100755 --- a/config/packages/presence.yaml +++ b/config/packages/presence.yaml @@ -274,63 +274,30 @@ automation: entity_id: input_boolean.skylar_school initial_state: true - - id: test_family_has_arrived - alias: Test Family Has arrived - trigger: - - entity_id: group.family - from: not_home - platform: state - to: home - action: - - service: script.text_notify - data_template: - who: "jeff" - title: "Family has arrived" - message: "Someone in the Family has arrived" - - - id: test_family_has_left - alias: Test Family Has left - trigger: - - entity_id: group.family - from: home - platform: state - to: not_home - action: - - service: script.text_notify - data_template: - who: "jeff" - title: "Family has left" - message: "Everyone in the Family has left" - - + ######################################################### - id: family_has_arrived alias: Family Has arrived trigger: + - platform: webhook + webhook_id: home_webhook - entity_id: sensor.family_status from: Away platform: state to: Home - - entity_id: person.jeffrey - event: enter - platform: zone - zone: zone.home - - entity_id: person.katherine - event: enter - platform: zone - zone: zone.home + - entity_id: group.family + from: not_home + platform: state + to: home + - entity_id: device_tracker.mal + from: not_home + platform: state + to: home + mode: single condition: - condition: state entity_id: sensor.family_status state: Away action: - - service: script.vacation_canceled - - service: script.appliances_on - - service: script.standby - - service: script.washer_finished_notification_audible - - service: alarm_control_panel.aarlo_set_mode - data: - entity_id: alarm_control_panel.aarlo_ah_base_station - mode: 'home' - service: script.family_is_home initial_state: true @@ -342,24 +309,22 @@ automation: from: Home platform: state to: Away + - platform: webhook + webhook_id: away_webhook + - entity_id: group.family + from: home + platform: state + to: not_home + mode: single condition: - condition: state entity_id: input_boolean.guest_mode state: 'off' action: - - service: script.appliances_off - - service: scene.turn_on - entity_id: scene.lights_out - - service: script.security_check_garage - - service: script.security_check_zones - - service: script.lockdown - - service: script.lockdown_issue - - service: script.all_fans_off - - service: alarm_control_panel.aarlo_set_mode - data: - entity_id: alarm_control_panel.aarlo_ah_base_station - mode: 'Armed' - + - service: script.family_is_away + + ######################################################### + - id: jeff_is_home alias: Jeff is Home initial_state: true @@ -368,12 +333,15 @@ automation: event: enter platform: zone zone: zone.home + mode: single action: - service: script.family_is_home - service: script.jeff_destination_na - service: script.driveway_on - entity_id: input_boolean.jeff_travel_monitor service: input_boolean.turn_off + - delay: + minutes: 2 - id: jeff_arrives_summit alias: Jeff Arrives At Summit @@ -420,11 +388,14 @@ automation: event: enter platform: zone zone: zone.home + mode: single action: - service: script.family_is_home - service: script.driveway_on - service: input_boolean.turn_off entity_id: input_boolean.kat_travel_monitor + - delay: + minutes: 2 - id: welcome_home alias: Welcome Home @@ -505,25 +476,68 @@ automation: - service: input_boolean.turn_off entity_id: input_boolean.jeff_traffic_alert_home - - id: '1550107919204' - alias: Family Is Home Webhook - trigger: - - platform: webhook - webhook_id: home_webhook - condition: [] - action: - - service: script.family_is_home + # - id: '1550107919204' + # alias: Family Is Home + # trigger: + # - platform: webhook + # webhook_id: home_webhook + # - entity_id: group.family + # from: not_home + # platform: state + # to: home + # condition: [] + # action: + # - service: script.family_is_home + + # - id: '1550108034209' + # alias: Family Is Away + # trigger: + # - platform: webhook + # webhook_id: away_webhook + # - entity_id: group.family + # from: home + # platform: state + # to: not_home + # condition: [] + # action: + # - service: script.family_is_away - - id: '1550108034209' - alias: Family Is Away Webhook - trigger: - - platform: webhook - webhook_id: away_webhook - condition: [] - action: - - service: script.family_is_away script: + family_is_home: + sequence: + - condition: state + entity_id: sensor.family_status + state: Away + - service: script.standby + - service: script.washer_finished_notification_audible + - service: mqtt.publish + data: + topic: house/family/status + payload_template: Home + retain: true + + family_is_away: + sequence: + - condition: state + entity_id: sensor.family_status + state: Home + - service: script.appliances_off + - service: scene.turn_on + entity_id: scene.lights_out + - service: script.security_check_garage + - service: script.security_check_zones + - service: script.lockdown + - service: script.lockdown_issue + - service: scene.turn_on + entity_id: scene.all_fans_off + - service: mqtt.publish + data: + topic: house/family/status + payload_template: Away + retain: true + + jeff_destination_zoo: sequence: - service: mqtt.publish diff --git a/config/packages/security.yaml b/config/packages/security.yaml index 2698053..343d0cb 100755 --- a/config/packages/security.yaml +++ b/config/packages/security.yaml @@ -213,6 +213,7 @@ automation: - binary_sensor.aarlo_motion_driveway from: 'off' to: 'on' + mode: single condition: - condition: state entity_id: input_boolean.audible_notifications @@ -236,6 +237,8 @@ automation: ] | random }} {{ trigger.to_state.attributes.friendly_name }}. call_snark_door_motion: 1 + - delay: + minutes: 2 initial_state: true - id: garage_opened_night @@ -320,10 +323,10 @@ automation: entity_id: script.security_response - service: media_player.media_stop entity_id: media_player.ha_speaker + - service: input_boolean.turn_off + entity_id: input_boolean.security_alarm - service: scene.turn_on - entity_id: scene.lr_red - - service: script.livingroom_lamps_on - - service: script.livingroom_lamps_off + entity_id: scene.normal_livingroom_lighting - id: sentry_mode_enabled alias: Sentry Mode Enabled Annoucement @@ -683,20 +686,30 @@ script: state: "off" - service: input_boolean.turn_on entity_id: input_boolean.sentry_mode + - service: alarm_control_panel.aarlo_set_mode + data: + entity_id: alarm_control_panel.aarlo_ah_base_station + mode: 'Armed' standby: sequence: - - condition: state - entity_id: input_boolean.vacation_mode - state: 'off' - - service: input_boolean.turn_off - entity_id: input_boolean.sentry_mode - - service: input_boolean.turn_off - entity_id: input_boolean.security_issue + - service: script.vacation_canceled + - service: script.disarm_security - service: input_boolean.turn_off entity_id: input_boolean.lockdown_issue + - service: alarm_control_panel.aarlo_set_mode + data: + entity_id: alarm_control_panel.aarlo_ah_base_station + mode: 'home' + + disarm_security: + sequence: + - condition: state + entity_id: input_boolean.sentry_mode + state: 'on' - service: input_boolean.turn_off - entity_id: input_boolean.security_alarm + entity_id: input_boolean.sentry_mode + visitors_here: sequence: @@ -727,6 +740,9 @@ script: vacation_canceled: sequence: + - condition: state + entity_id: input_boolean.vacation_mode + state: 'on' - data: entity_id: input_boolean.vacation_mode service: input_boolean.turn_off diff --git a/config/packages/space.yaml b/config/packages/space.yaml index d419205..26e1268 100755 --- a/config/packages/space.yaml +++ b/config/packages/space.yaml @@ -27,29 +27,30 @@ sensor: - platform: moon - platform: launch_library - - platform: rest - scan_interval: 1800 - resource: https://launchlibrary.net/1.2.2/launch/next/10 - # resource: https://raw.githubusercontent.com/cribbstechnologies/ha_config/master/www/test_launch.json - name: launch window - # if the current timestamp is in the launch window - # this sensor will return the UTC timestamp of the launch - value_template: >- - {%- for launch in value_json.launches %} - {% if launch.location.id == 16 or launch.location.id == 17 %} - {% if strptime(launch.isostart, '%Y%m%dT%H%M%SZ').strftime('%Y-%m-%d') == now().strftime('%Y-%m-%d') %} - {% set utc_offset_string = now().strftime('%z') %} - {% set utc_offset_direction = utc_offset_string[:1] %} - {% set utc_offset_hours = now().strftime('%z')[-4:] %} - {% set utc_offset_seconds = (utc_offset_hours| int /100) * 60 * 60 %} - {% if utc_offset_direction == '-' %} - {{ launch.wsstamp - utc_offset_seconds}} - {% else %} - {{ launch.wsstamp + utc_offset_seconds}} - {% endif %} - {% endif %} - {% endif %} - {% endfor %} + # Disabling + # - platform: rest + # scan_interval: 1800 + # resource: https://launchlibrary.net/1.2.2/launch/next/10 + # # resource: https://raw.githubusercontent.com/cribbstechnologies/ha_config/master/www/test_launch.json + # name: launch window + # # if the current timestamp is in the launch window + # # this sensor will return the UTC timestamp of the launch + # value_template: >- + # {%- for launch in value_json.launches %} + # {% if launch.location.id == 16 or launch.location.id == 17 %} + # {% if strptime(launch.isostart, '%Y%m%dT%H%M%SZ').strftime('%Y-%m-%d') == now().strftime('%Y-%m-%d') %} + # {% set utc_offset_string = now().strftime('%z') %} + # {% set utc_offset_direction = utc_offset_string[:1] %} + # {% set utc_offset_hours = now().strftime('%z')[-4:] %} + # {% set utc_offset_seconds = (utc_offset_hours| int /100) * 60 * 60 %} + # {% if utc_offset_direction == '-' %} + # {{ launch.wsstamp - utc_offset_seconds}} + # {% else %} + # {{ launch.wsstamp + utc_offset_seconds}} + # {% endif %} + # {% endif %} + # {% endif %} + # {% endfor %} automation: diff --git a/config/packages/twitter.yaml b/config/packages/twitter.yaml index c608db6..f3f1054 100755 --- a/config/packages/twitter.yaml +++ b/config/packages/twitter.yaml @@ -246,7 +246,7 @@ automation: - delay: '0{{ (range(1, 5)|random|int) }}:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}:00' - service: script.twitter_notify_image data_template: - message: >- + tweet: >- {{ [ "There are only {{states.sensor.halloween_countdown.state}} days until Halloween.", "Halloween is only {{states.sensor.halloween_countdown.state}} days away. It might not be enough time. ", "Halloween is coming. {{states.sensor.halloween_countdown.state}} days and counting.", @@ -254,7 +254,7 @@ automation: "You have {{states.sensor.halloween_countdown.state}} days until you need a Halloween costume.", "Only {{states.sensor.halloween_countdown.state}} days until Halloween. But who is counting. amirite?", "Would it be cliche if I went as a haunted house for Halloween? Asking for a another house.", - "Just in case I wanted to be HAL 9000 for Halloween I ordered some Pod Bay Doors." + "Just in case I wanted to be HAL 9000 for Halloween I ordered some Pod Bay Doors. They need to get here in {{states.sensor.halloween_countdown.state}} days." ] | random }} image: >- {{ [ "/config/www/tweet_images/halloween/potion.jpg", diff --git a/config/packages/weather.yaml b/config/packages/weather.yaml index 1890de0..a91b612 100755 --- a/config/packages/weather.yaml +++ b/config/packages/weather.yaml @@ -90,29 +90,34 @@ sensor: friendly_name: 'Flood Watch' entity_id: sensor.time value_template: >- - {% if 'Flood Watch' in states.sensor.nws_alerts.attributes.title.split(' - ')[0] or - 'Flood Watch' in states.sensor.nws_alerts.attributes.title.split(' - ')[1] or - 'Flood Watch' in states.sensor.nws_alerts.attributes.title.split(' - ')[2] or - 'Flood Watch' in states.sensor.nws_alerts.attributes.title.split(' - ')[3] or - 'Flood Watch' in states.sensor.nws_alerts.attributes.title.split(' - ')[4] or - 'Flood Watch' in states.sensor.nws_alerts.attributes.title.split(' - ')[5] - %} - {{ states.sensor.nws_alerts.attributes.spoken_desc }} + {% if states.sensor.nws_alerts.state | int > 0 %} + {% if 'Flood Watch' in states.sensor.nws_alerts.attributes.title.split(' - ')[0] or + 'Flood Watch' in states.sensor.nws_alerts.attributes.title.split(' - ')[1] or + 'Flood Watch' in states.sensor.nws_alerts.attributes.title.split(' - ')[2] or + 'Flood Watch' in states.sensor.nws_alerts.attributes.title.split(' - ')[3] or + 'Flood Watch' in states.sensor.nws_alerts.attributes.title.split(' - ')[4] or + 'Flood Watch' in states.sensor.nws_alerts.attributes.title.split(' - ')[5] + %} + active + {% endif %} {% else %} inactive {% endif %} + flood_warning: friendly_name: 'Flood Warning' entity_id: sensor.time value_template: >- - {% if 'Flood Warning' in states.sensor.nws_alerts.attributes.title.split(' - ')[0] or - 'Flood Warning' in states.sensor.nws_alerts.attributes.title.split(' - ')[1] or - 'Flood Warning' in states.sensor.nws_alerts.attributes.title.split(' - ')[2] or - 'Flood Warning' in states.sensor.nws_alerts.attributes.title.split(' - ')[3] or - 'Flood Warning' in states.sensor.nws_alerts.attributes.title.split(' - ')[4] or - 'Flood Warning' in states.sensor.nws_alerts.attributes.title.split(' - ')[5] - %} - {{ states.sensor.nws_alerts.attributes.spoken_desc }} + {% if states.sensor.nws_alerts.state | int > 0 %} + {% if 'Flood Warning' in states.sensor.nws_alerts.attributes.title.split(' - ')[0] or + 'Flood Warning' in states.sensor.nws_alerts.attributes.title.split(' - ')[1] or + 'Flood Warning' in states.sensor.nws_alerts.attributes.title.split(' - ')[2] or + 'Flood Warning' in states.sensor.nws_alerts.attributes.title.split(' - ')[3] or + 'Flood Warning' in states.sensor.nws_alerts.attributes.title.split(' - ')[4] or + 'Flood Warning' in states.sensor.nws_alerts.attributes.title.split(' - ')[5] + %} + active + {% endif %} {% else %} inactive {% endif %} @@ -120,6 +125,7 @@ sensor: friendly_name: 'Thunderstorm Warning' entity_id: sensor.time value_template: >- + {% if states.sensor.nws_alerts.state | int > 0 %} {% if 'Thunderstorm Warning' in states.sensor.nws_alerts.attributes.title.split(' - ')[0] or 'Thunderstorm Warning' in states.sensor.nws_alerts.attributes.title.split(' - ')[1] or 'Thunderstorm Warning' in states.sensor.nws_alerts.attributes.title.split(' - ')[2] or @@ -127,14 +133,16 @@ sensor: 'Thunderstorm Warning' in states.sensor.nws_alerts.attributes.title.split(' - ')[4] or 'Thunderstorm Warning' in states.sensor.nws_alerts.attributes.title.split(' - ')[5] %} - {{ states.sensor.nws_alerts.attributes.spoken_desc }} - {% else %} - inactive + active {% endif %} + {% else %} + inactive + {% endif %} tstorm_watch: friendly_name: 'Thunderstorm Watch' entity_id: sensor.time value_template: >- + {% if states.sensor.nws_alerts.state | int > 0 %} {% if 'Thunderstorm Watch' in states.sensor.nws_alerts.attributes.title.split(' - ')[0] or 'Thunderstorm Watch' in states.sensor.nws_alerts.attributes.title.split(' - ')[1] or 'Thunderstorm Watch' in states.sensor.nws_alerts.attributes.title.split(' - ')[2] or @@ -142,14 +150,16 @@ sensor: 'Thunderstorm Watch' in states.sensor.nws_alerts.attributes.title.split(' - ')[4] or 'Thunderstorm Watch' in states.sensor.nws_alerts.attributes.title.split(' - ')[5] %} - {{ states.sensor.nws_alerts.attributes.spoken_desc }} - {% else %} - inactive + active {% endif %} + {% else %} + inactive + {% endif %} tornado_watch: friendly_name: 'Tornado Watch' entity_id: sensor.time value_template: >- + {% if states.sensor.nws_alerts.state | int > 0 %} {% if 'Tornado Watch' in states.sensor.nws_alerts.attributes.title.split(' - ')[0] or 'Tornado Watch' in states.sensor.nws_alerts.attributes.title.split(' - ')[1] or 'Tornado Watch' in states.sensor.nws_alerts.attributes.title.split(' - ')[2] or @@ -157,14 +167,16 @@ sensor: 'Tornado Watch' in states.sensor.nws_alerts.attributes.title.split(' - ')[4] or 'Tornado Watch' in states.sensor.nws_alerts.attributes.title.split(' - ')[5] %} - {{ states.sensor.nws_alerts.attributes.spoken_desc }} - {% else %} - inactive + active {% endif %} + {% else %} + inactive + {% endif %} tornado_warning: friendly_name: 'Tornado Warning' entity_id: sensor.time value_template: >- + {% if states.sensor.nws_alerts.state | int > 0 %} {% if 'Tornado Warning' in states.sensor.nws_alerts.attributes.title.split(' - ')[0] or 'Tornado Warning' in states.sensor.nws_alerts.attributes.title.split(' - ')[1] or 'Tornado Warning' in states.sensor.nws_alerts.attributes.title.split(' - ')[2] or @@ -172,10 +184,11 @@ sensor: 'Tornado Warning' in states.sensor.nws_alerts.attributes.title.split(' - ')[4] or 'Tornado Warning' in states.sensor.nws_alerts.attributes.title.split(' - ')[5] %} - {{ states.sensor.nws_alerts.attributes.spoken_desc }} - {% else %} - inactive + active {% endif %} + {% else %} + inactive + {% endif %} backporch_weather: friendly_name: Back Porch Weather value_template: "{{ states.sensor.back_porch.state | round}} °F / {{ states.sensor.back_porch.attributes.humidity }} %" @@ -602,6 +615,16 @@ automation: script: + + store_lightning_count: + sequence: + - service: mqtt.publish + data: + topic: house/lightning/total_count + payload_template: "{{ states.sensor.back_porch.attributes.strike_count | int }}" + retain: true + + nws_popup_on_wx_alert: alias: NWS Weather Alert Pop Up sequence: diff --git a/config/scenes.yaml b/config/scenes.yaml index 6320cdd..395b185 100755 --- a/config/scenes.yaml +++ b/config/scenes.yaml @@ -401,3 +401,17 @@ # input_number.skylar_tv_time: 60 # input_number.skylar_ps_time: 60 # input_number.skylar_yt_time: 0 + +- name: all fans off + entities: + switch.croft_fan: + state: 'off' + switch.livingroom_fan: + state: 'off' + +- name: all fans on + entities: + switch.croft_fan: + state: 'on' + switch.livingroom_fan: + state: 'on' \ No newline at end of file