[ { "id": "arrival_unlock_door", "automation": "- alias: Unlock Front Door Upon Arrivial\n id: arrival_unlock_door\n trigger:\n platform: state\n entity_id:\n - person.trevor\n - person.emily\n from: not_home\n to: home\n condition:\n condition: and\n conditions:\n - condition: state\n entity_id: lock.lock_front_door_lock\n state: locked\n - condition: time\n after: 06:00:00\n before: '23:00:00'\n action:\n - service: lock.unlock\n entity_id: lock.lock_front_door_lock\n - wait_template: '{{ is_state(''binary_sensor.front_door_sensor_window_door_is_open'',\n ''on'') }}'\n timeout: 00:05:00\n - service: script.relock_front_door", "config": [ { "name": "Trevor person", "room": "home", "type": "person", "id": { "entity_id": "person.trevor", "device_id": null } }, { "name": "Emily person", "room": "home", "type": "person", "id": { "entity_id": "person.emily", "device_id": null } }, { "name": "Front door lock", "room": "front_door", "type": "lock", "id": { "entity_id": "lock.lock_front_door_lock", "device_id": null } }, { "name": "Front door sensor", "room": "front_door", "type": "binary_sensor", "id": { "entity_id": "binary_sensor.front_door_sensor_window_door_is_open", "device_id": null } }, { "name": "Relock Front Door Script", "room": "Front Door", "type": "script", "id": { "entity_id": "script.relock_front_door", "device_id": null } } ] }, { "id": "bathroom_humidity_difference", "automation": "- alias: Bathroom Humidity Difference\n id: bathroom_humidity_difference\n trigger:\n - platform: numeric_state\n entity_id: sensor.bathroom_sensor_humidity\n above: '70'\n condition:\n condition: numeric_state\n entity_id: sensor.bathroom_humidity_diff\n above: '10'\n action:\n - delay: 00:05:00\n - service: homeassistant.turn_on\n entity_id: script.bathroom_humidity", "config": [ { "name": "Bathroom sensor humidity", "room": "bathroom", "type": "sensor", "id": { "entity_id": "sensor.bathroom_sensor_humidity", "device_id": null } }, { "name": "Bathroom humidity diff", "room": "bathroom", "type": "sensor", "id": { "entity_id": "sensor.bathroom_humidity_diff", "device_id": null } }, { "name": "Bathroom Humidity Script", "room": "Bathroom", "type": "script", "id": { "entity_id": "script.bathroom_humidity", "device_id": null } } ] }, { "id": "bathroom_movement", "automation": "- alias: Bathroom light - presence detected\n id: bathroom_movement\n trigger:\n - platform: state\n entity_id: binary_sensor.bathroom_presence_presence\n to: 'on'\n id: 'on'\n - platform: state\n entity_id: binary_sensor.bathroom_presence_presence\n to: 'off'\n id: 'off'\n for:\n minutes: 1\n action:\n - choose:\n - conditions:\n - condition: trigger\n id: 'on'\n - condition: state\n entity_id: light.bathroom_light\n state: 'off'\n - condition: time\n before: '22:00:00'\n after: 05:00:00\n sequence:\n - action: light.turn_on\n data_template:\n entity_id: light.bathroom_light\n transition: 2\n brightness: \"{%- if now().strftime('%H')|int >=19 -%}\\n {{3|int}}\\n{%-\\\n \\ elif now().strftime('%H')|int >=17 -%}\\n {{30|int}}\\n{%- elif now().strftime('%H')\\\n \\ |int >=8 -%}\\n {{100|int}}\\n{%- else -%}\\n {{20|int}}\\n{%- endif -%}\"\n - choose:\n - conditions:\n - condition: trigger\n id: 'off'\n sequence:\n - action: light.turn_off\n target:\n entity_id: light.bathroom_light\n mode: single", "config": [ { "name": "Bathroom presence", "room": "bathroom", "type": "binary_sensor", "id": { "entity_id": "binary_sensor.bathroom_presence_presence", "device_id": null } }, { "name": "Bathroom light", "room": "bathroom", "type": "light", "id": { "entity_id": "light.bathroom_light", "device_id": null } } ] }, { "id": "bathroom_switch_doubletap", "automation": "- alias: Bathroom Switch Double Tap\n id: bathroom_switch_doubletap\n trigger:\n - platform: event\n event_type: zwave_js_value_notification\n event_data:\n device_id: 8cb32c0ca9f0f5ed4c376b0cb02470fa\n action:\n - service: light.turn_on\n data_template:\n brightness_pct: \"{% if trigger.event.data.value == 255 %}\\n 100\\n{% elif trigger.event.data.value\\\n \\ == 0 %}\\n 4\\n{% endif %}\\n\"\n entity_id: light.bathroom_light", "config": [ { "name": "Bathroom light", "room": "bathroom", "type": "light", "id": { "entity_id": "light.bathroom_light", "device_id": null } }, { "name": "Bathroom switch", "room": "bathroom", "type": "device", "id": { "entity_id": null, "device_id": "8cb32c0ca9f0f5ed4c376b0cb02470fa" } } ] }, { "id": "bedroom_switch_doubletap", "automation": "- alias: Bedroom Switch Double Tap\n id: bedroom_switch_doubletap\n trigger:\n - platform: event\n event_type: zwave_js_value_notification\n event_data:\n device_id: b5f2fcf85f9b0d26d287adc42f27100a\n action:\n - service: light.turn_on\n data_template:\n brightness_pct: \"{% if trigger.event.data.value == 255 %}\\n 100\\n{% elif trigger.event.data.value\\\n \\ == 0 %}\\n 10\\n{% endif %}\\n\"\n entity_id: light.bedroom_light", "config": [ { "name": "Bedroom switch", "room": "bedroom", "type": "device", "id": { "entity_id": null, "device_id": "b5f2fcf85f9b0d26d287adc42f27100a" } }, { "name": "Bedroom light", "room": "bedroom", "type": "light", "id": { "entity_id": "light.bedroom_light", "device_id": null } } ] }, { "id": "christmas_tree_movement", "automation": "- alias: Christmas Tree - Movement\n id: christmas_tree_movement\n mode: single\n trigger:\n - platform: state\n entity_id: binary_sensor.living_room_presence_presence\n to: 'on'\n id: 'on'\n - platform: state\n entity_id: binary_sensor.living_room_presence_presence\n to: 'off'\n id: 'off'\n for:\n minutes: 10\n - platform: state\n entity_id: binary_sensor.kitchen_presence_presence\n to: 'on'\n id: 'on'\n - platform: state\n entity_id: binary_sensor.kitchen_presence_presence\n to: 'off'\n id: 'off'\n for:\n minutes: 10\n - platform: state\n entity_id: binary_sensor.hallway_sensor_motion\n to: 'on'\n id: 'on'\n - platform: state\n entity_id: binary_sensor.hallway_sensor_motion\n to: 'off'\n id: 'off'\n for:\n minutes: 10\n conditions:\n - condition: state\n entity_id: group.presence\n state: home\n - condition: state\n entity_id: sensor.christmas_tree_node_status\n state: alive\n action:\n - choose:\n - conditions:\n - condition: trigger\n id: 'on'\n - condition: state\n entity_id: group.presence\n state: home\n - condition: state\n entity_id: switch.christmas_tree\n state: 'off'\n - condition: time\n before: '22:00:00'\n after: 04:00:00\n sequence:\n - action: switch.turn_on\n target:\n entity_id: switch.christmas_tree\n - choose:\n - conditions:\n - condition: trigger\n id: 'off'\n - condition: time\n before: 05:30:00\n after: '20:30:00'\n sequence:\n - action: switch.turn_off\n target:\n entity_id: switch.christmas_tree", "config": [ { "name": "Living room presence", "room": "living_room", "type": "binary_sensor", "id": { "entity_id": "binary_sensor.living_room_presence_presence", "device_id": null } }, { "name": "Kitchen presence", "room": "kitchen", "type": "binary_sensor", "id": { "entity_id": "binary_sensor.kitchen_presence_presence", "device_id": null } }, { "name": "Hallway sensor motion", "room": "hallway", "type": "binary_sensor", "id": { "entity_id": "binary_sensor.hallway_sensor_motion", "device_id": null } }, { "name": "Presence group", "room": "home", "type": "group", "id": { "entity_id": "group.presence", "device_id": null } }, { "name": "Christmas tree node status", "room": "living_room", "type": "sensor", "id": { "entity_id": "sensor.christmas_tree_node_status", "device_id": null } }, { "name": "Christmas tree switch", "room": "living_room", "type": "switch", "id": { "entity_id": "switch.christmas_tree", "device_id": null } }, { "name": "All", "room": null, "type": null, "id": { "entity_id": "all", "device_id": null } } ] }, { "id": "christmas_tree_schedule", "automation": "- alias: Christmas Tree schedule\n id: christmas_tree_schedule\n mode: single\n trigger:\n - platform: time\n id: start\n at: 05:30:00\n - platform: time\n id: end\n at: '20:30:00'\n conditions:\n - condition: state\n entity_id: group.presence\n state: home\n - condition: state\n entity_id: sensor.christmas_tree_node_status\n state: alive\n action:\n - choose:\n - conditions:\n - condition: trigger\n id: start\n sequence:\n - action: switch.turn_on\n target:\n entity_id: switch.christmas_tree\n - choose:\n - conditions:\n - condition: trigger\n id: end\n sequence:\n - action: switch.turn_off\n target:\n entity_id: switch.christmas_tree", "config": [ { "name": "Presence group", "room": "home", "type": "group", "id": { "entity_id": "group.presence", "device_id": null } }, { "name": "Christmas tree node status", "room": "living_room", "type": "sensor", "id": { "entity_id": "sensor.christmas_tree_node_status", "device_id": null } }, { "name": "Christmas tree switch", "room": "living_room", "type": "switch", "id": { "entity_id": "switch.christmas_tree", "device_id": null } } ] }, { "id": "climate_arrive", "automation": "- alias: Hello Climate\n id: climate_arrive\n trigger:\n platform: state\n entity_id: group.climate_presence\n from: not_home\n to: home\n action:\n - service: climate.set_preset_mode\n data:\n entity_id: climate.home\n preset_mode: home\n - delay: 00:30:00\n - service: ecobee.resume_program\n data_template:\n entity_id: climate.home\n resume_all: '{% if is_state(\"sun.sun\", \"below_horizon\") -%} true {%- else -%}\n false {%- endif %}'", "config": [ { "name": "Climate presence group", "room": "home", "type": "group", "id": { "entity_id": "group.climate_presence", "device_id": null } }, { "name": "Home climate", "room": "home", "type": "climate", "id": { "entity_id": "climate.home", "device_id": null } }, { "name": "Sun sun", "room": "outside", "type": "sensor", "id": { "entity_id": "sun.sun", "device_id": null } }, { "name": "All", "room": null, "type": null, "id": { "entity_id": "all", "device_id": null } } ] }, { "id": "climate_left", "automation": "- alias: Goodbye Climate\n id: climate_left\n trigger:\n platform: state\n entity_id: group.climate_presence\n from: home\n to: not_home\n action:\n - service: climate.set_preset_mode\n data:\n entity_id: climate.home\n preset_mode: away", "config": [ { "name": "Climate presence group", "room": "home", "type": "group", "id": { "entity_id": "group.climate_presence", "device_id": null } }, { "name": "Home climate", "room": "home", "type": "climate", "id": { "entity_id": "climate.home", "device_id": null } } ] }, { "id": "coffee_light", "automation": "- alias: Kitchen lights to get coffee\n id: coffee_light\n mode: single\n trigger:\n - platform: state\n entity_id: binary_sensor.hallway_sensor_motion\n to: 'on'\n condition:\n condition: and\n conditions:\n - condition: numeric_state\n entity_id: sun.sun\n attribute: elevation\n below: 4\n - condition: state\n entity_id: switch.coffee\n state: 'on'\n - condition: state\n entity_id: light.kitchen_light_2\n state: 'off'\n action:\n - service: automation.turn_off\n entity_id: automation.kitchen_movement\n - service: light.turn_on\n target:\n entity_id: light.kitchen_light_2\n data:\n brightness_pct: 3\n - wait_template: '{{ is_state(''binary_sensor.kitchen_presence_presence'', ''on'')\n }}'\n timeout: 00:10:00\n continue_on_timeout: true\n - wait_template: '{{ is_state(''binary_sensor.kitchen_presence_presence'', ''off'')\n }}'\n timeout: 00:10:00\n continue_on_timeout: true\n - service: automation.turn_on\n entity_id: automation.kitchen_movement\n - condition: and\n conditions:\n - condition: state\n entity_id: light.kitchen_light_1\n state: 'off'\n - service: light.turn_off\n target:\n entity_id: light.kitchen_light_2", "config": [ { "name": "Kitchen presence", "room": "kitchen", "type": "binary_sensor", "id": { "entity_id": "binary_sensor.kitchen_presence_presence", "device_id": null } }, { "name": "Hallway sensor motion", "room": "hallway", "type": "binary_sensor", "id": { "entity_id": "binary_sensor.hallway_sensor_motion", "device_id": null } }, { "name": "Sun sun", "room": "outside", "type": "sensor", "id": { "entity_id": "sun.sun", "device_id": null } }, { "name": "Coffee switch", "room": "kitchen", "type": "switch", "id": { "entity_id": "switch.coffee", "device_id": null } }, { "name": "Kitchen light 2", "room": "kitchen", "type": "light", "id": { "entity_id": "light.kitchen_light_2", "device_id": null } }, { "name": "Kitchen light 1", "room": "kitchen", "type": "light", "id": { "entity_id": "light.kitchen_light_1", "device_id": null } }, { "name": "All", "room": null, "type": null, "id": { "entity_id": "all", "device_id": null } }, { "name": "Kitchen Movement Automation", "room": "Kitchen", "type": "automation", "id": { "entity_id": "automation.kitchen_movement", "device_id": null } } ] }, { "id": "coffee_monitor", "automation": "- alias: Beat Moccamaster's timer to the punch\n id: coffee_monitor\n trigger:\n - platform: state\n entity_id: switch.coffee\n from: 'off'\n to: 'on'\n action:\n - wait_template: '{{ is_state(''switch.coffee'', ''off'') }}'\n timeout: 01:25:00\n continue_on_timeout: true\n - service: switch.turn_off\n entity_id: switch.coffee", "config": [ { "name": "Coffee switch", "room": "kitchen", "type": "switch", "id": { "entity_id": "switch.coffee", "device_id": null } } ] }, { "id": "coffee_start_ready_off", "automation": "- alias: Turn off the ready switch when the Coffee starts\n id: coffee_start_ready_off\n trigger:\n - platform: state\n entity_id: switch.coffee\n to: 'on'\n action:\n - service: input_boolean.turn_off\n entity_id: input_boolean.coffee_set", "config": [ { "name": "Coffee switch", "room": "kitchen", "type": "switch", "id": { "entity_id": "switch.coffee", "device_id": null } }, { "name": "Coffee set input boolean", "room": "kitchen", "type": "input_boolean", "id": { "entity_id": "input_boolean.coffee_set", "device_id": null } } ] }, { "id": "hallway_movement", "automation": "- alias: Hallway Movement\n id: hallway_movement\n trigger:\n - platform: state\n entity_id: binary_sensor.hallway_sensor_motion\n to: 'on'\n id: 'on'\n - platform: state\n entity_id: binary_sensor.hallway_sensor_motion\n to: 'off'\n id: 'off'\n for:\n minutes: 1\n action:\n - choose:\n - conditions:\n - condition: trigger\n id: 'on'\n - condition: state\n entity_id: light.hallway_light\n state: 'off'\n - condition: state\n entity_id: input_boolean.hallway_light_auto_on\n state: 'on'\n sequence:\n - action: light.turn_on\n data_template:\n entity_id: light.hallway_light\n transition: 2\n brightness: \"{%- if now().strftime('%H')|int >=19 -%}\\n {{3|int}}\\n{%-\\\n \\ elif now().strftime('%H')|int >=17 -%}\\n {{30|int}}\\n{%- elif now().strftime('%H')\\\n \\ |int >=8 -%}\\n {{100|int}}\\n{%- else -%}\\n {{20|int}}\\n{%- endif -%}\"\n - choose:\n - conditions:\n - condition: trigger\n id: 'off'\n sequence:\n - action: light.turn_off\n target:\n entity_id: light.hallway_light\n mode: single", "config": [ { "name": "Hallway sensor motion", "room": "hallway", "type": "binary_sensor", "id": { "entity_id": "binary_sensor.hallway_sensor_motion", "device_id": null } }, { "name": "Hallway light", "room": "hallway", "type": "light", "id": { "entity_id": "light.hallway_light", "device_id": null } }, { "name": "Hallway light auto on", "room": "hallway", "type": "input_boolean", "id": { "entity_id": "input_boolean.hallway_light_auto_on", "device_id": null } }, { "name": "All", "room": null, "type": null, "id": { "entity_id": "all", "device_id": null } } ] }, { "id": "hallway_switch_doubletap", "automation": "- alias: Hallway Switch Double Tap\n id: hallway_switch_doubletap\n trigger:\n - platform: event\n event_type: zwave_js_value_notification\n event_data:\n device_id: db9121a9896e3f93d42ef75a8fc05ed1\n action:\n - service: light.turn_on\n data_template:\n brightness_pct: \"{% if trigger.event.data.value == 255 %}\\n 100\\n{% elif trigger.event.data.value\\\n \\ == 0 %}\\n 10\\n{% endif %}\\n\"\n entity_id: light.hallway_light", "config": [ { "name": "Hallway light", "room": "hallway", "type": "light", "id": { "entity_id": "light.hallway_light", "device_id": null } }, { "name": "Hallway switch", "room": "hallway", "type": "device", "id": { "entity_id": null, "device_id": "db9121a9896e3f93d42ef75a8fc05ed1" } }, { "name": "All", "room": null, "type": null, "id": { "entity_id": "all", "device_id": null } } ] }, { "id": "hippo_clear", "automation": "- id: hippo_clear\n alias: clear the Hippos schedule and/or make certain it has enough charge\n trigger:\n - platform: numeric_state\n entity_id: sensor.next_hippo_departure_hrs\n above: '24'\n - platform: state\n entity_id: binary_sensor.the_hippo_charger\n from: 'on'\n to: 'off'\n - platform: state\n entity_id: binary_sensor.the_hippo_charger\n from: 'off'\n to: 'on'\n action:\n - choose:\n - conditions:\n - condition: template\n value_template: '{{(integration_entities(''scheduler'') | select(''is_state'',\n ''on'') | expand | sort(attribute=\"attributes.next_trigger\") | first |\n regex_findall(\"\\''value\\''\\: \\d+\",\"\") | regex_replace (\"[^0-9]\",\"\") | int(default=69))\n > 70 }}'\n - condition: template\n value_template: '{{float(states(''sensor.next_hippo_departure_hrs''), 7) >\n 6 }}'\n - '{{float(states(''sensor.next_hippo_departure_hrs''), 25 ) < 24 }}'\n - condition: numeric_state\n entity_id: sensor.the_hippo_battery\n below: 65\n sequence:\n - service: script.turn_on\n data:\n entity_id: script.hippo_minimum_charge\n - conditions:\n - '{{float(states(''sensor.next_hippo_departure_hrs''), 25) > 24 }}'\n - condition: state\n entity_id: device_tracker.the_hippo_location_tracker\n state: home\n sequence:\n - alias: Wait until car is in park\n wait_template: '{{ is_state(''sensor.the_hippo_shift_state'', ''P'') }}'\n - service: tesla_custom.api\n data:\n command: SCHEDULED_DEPARTURE\n parameters:\n path_vars:\n vehicle_id: '{{ state_attr(''binary_sensor.the_hippo_online'', ''id'')\n }}'\n enable: true\n departure_time: 1\n preconditioning_enabled: false\n preconditioning_weekdays_only: false\n off_peak_charging_enabled: false\n off_peak_charging_weekdays_only: false\n end_off_peak_time: 1\n wake_if_asleep: true\n - service: tesla_custom.api\n data:\n command: CHANGE_CHARGE_LIMIT\n parameters:\n path_vars:\n vehicle_id: '{{ state_attr(''binary_sensor.the_hippo_online'', ''id'')\n }}'\n percent: 70", "config": [ { "name": "Next hippo departure hrs", "room": "garage", "type": "sensor", "id": { "entity_id": "sensor.next_hippo_departure_hrs", "device_id": null } }, { "name": "The hippo charger", "room": "garage", "type": "binary_sensor", "id": { "entity_id": "binary_sensor.the_hippo_charger", "device_id": null } }, { "name": "The hippo battery", "room": "garage", "type": "sensor", "id": { "entity_id": "sensor.the_hippo_battery", "device_id": null } }, { "name": "The hippo location tracker", "room": "garage", "type": "device_tracker", "id": { "entity_id": "device_tracker.the_hippo_location_tracker", "device_id": null } }, { "name": "The hippo shift state", "room": "garage", "type": "sensor", "id": { "entity_id": "sensor.the_hippo_shift_state", "device_id": null } }, { "name": "The hippo online", "room": "garage", "type": "binary_sensor", "id": { "entity_id": "binary_sensor.the_hippo_online", "device_id": null } }, { "name": "All", "room": null, "type": null, "id": { "entity_id": "all", "device_id": null } }, { "name": "Hippo Minimum Charge Script", "room": null, "type": "script", "id": { "entity_id": "script.hippo_minimum_charge", "device_id": null } }, { "name": "Turn On Script", "room": null, "type": "script", "id": { "entity_id": "script.turn_on", "device_id": null } }, { "name": "Next Hippo Departure", "room": null, "type": "sensor", "id": { "entity_id": "sensor.next_hippo_departure", "device_id": null } } ] }, { "id": "hippo_departure", "automation": "- id: hippo_departure\n alias: Schedule the next Forest Hippo adventure\n trigger:\n - platform: time_pattern\n minutes: /15\n condition:\n - '{{int(states(''sensor.next_hippo_departure_hrs'')) < 14 }}'\n - '{{state_attr(''binary_sensor.the_hippo_scheduled_departure'', ''Departure timestamp''\n ) != as_timestamp(states(''sensor.next_hippo_departure'' )) }}'\n - condition: state\n entity_id: sensor.the_hippo_shift_state\n state: P\n - condition: state\n entity_id: device_tracker.the_hippo_location_tracker\n state: home\n action:\n - service: tesla_custom.api\n data:\n command: CHANGE_CHARGE_LIMIT\n parameters:\n path_vars:\n vehicle_id: '{{ state_attr(''binary_sensor.the_hippo_online'', ''id'') }}'\n wake_if_asleep: true\n percent: '{{integration_entities(''scheduler'') | select(''is_state'', ''on'')\n | expand | sort(attribute=\"attributes.next_trigger\") | first | regex_findall(\"\\''value\\''\\:\n \\d+\",\"\") | regex_replace (\"[^0-9]\",\"\") | int(default=69) }}'\n - delay: 00:00:45\n - service: switch.turn_off\n entity_id: switch.the_hippo_charger\n - service: tesla_custom.api\n data:\n command: SCHEDULED_DEPARTURE\n parameters:\n path_vars:\n vehicle_id: '{{ state_attr(''binary_sensor.the_hippo_online'', ''id'') }}'\n enable: true\n departure_time: '{{(states(''sensor.next_hippo_departure'') | as_timestamp\n | timestamp_custom(''%H:%M''))[0:2] | int * 60 + (states(''sensor.next_hippo_departure'')\n | as_timestamp | timestamp_custom(''%H:%M''))[3:5] | int}}'\n preconditioning_enabled: true\n preconditioning_weekdays_only: false\n off_peak_charging_enabled: '{{(integration_entities(''scheduler'') | select(''is_state'',\n ''on'') | expand | sort(attribute=\"attributes.next_trigger\") | first |\n regex_findall(\"\\''value\\''\\: \\d+\",\"\") | regex_replace (\"[^0-9]\",\"\") | int(default=69))\n > 70 }}'\n off_peak_charging_weekdays_only: false\n end_off_peak_time: '{{(states(''sensor.next_hippo_departure'') | as_timestamp\n | timestamp_custom(''%H:%M''))[0:2] | int * 60 + (states(''sensor.next_hippo_departure'')\n | as_timestamp | timestamp_custom(''%H:%M''))[3:5] | int}}'\n - service: input_datetime.set_datetime\n target:\n entity_id: input_datetime.hippo_departure\n data_template:\n datetime: '{{states(''sensor.next_hippo_departure'')}}'\n - delay: 00:07:00\n - service: notify.phones\n data:\n title: Hippo charge level set\n message: The Hippo's charge level was set to {{states('number.the_hippo_charge_limit')}}%\n for an adventure on {{states('sensor.next_hippo_departure') | as_timestamp\n | timestamp_custom('%A at %H%M')}}. The charger is currently {{ iif(is_state('binary_sensor.the_hippo_charging',\n 'on'), 'charging', iif(is_state('binary_sensor.the_hippo_charging', 'off'),\n 'paused', 'unknown')) }}.\n - choose:\n - conditions:\n - condition: template\n value_template: '{{(integration_entities(''scheduler'') | select(''is_state'',\n ''on'') | expand | sort(attribute=\"attributes.next_trigger\") | first |\n regex_findall(\"\\''value\\''\\: \\d+\",\"\") | regex_replace (\"[^0-9]\",\"\") | int(default=69))\n > 70 }}'\n - condition: template\n value_template: '{{int(states(''sensor.next_hippo_departure_hrs'')) > 6 }}'\n - condition: numeric_state\n entity_id: sensor.the_hippo_battery\n below: 65\n sequence:\n - service: script.turn_on\n data:\n entity_id: script.hippo_minimum_charge", "config": [ { "name": "Next hippo departure hrs", "room": "garage", "type": "sensor", "id": { "entity_id": "sensor.next_hippo_departure_hrs", "device_id": null } }, { "name": "The hippo battery", "room": "garage", "type": "sensor", "id": { "entity_id": "sensor.the_hippo_battery", "device_id": null } }, { "name": "The hippo location tracker", "room": "garage", "type": "device_tracker", "id": { "entity_id": "device_tracker.the_hippo_location_tracker", "device_id": null } }, { "name": "The hippo shift state", "room": "garage", "type": "sensor", "id": { "entity_id": "sensor.the_hippo_shift_state", "device_id": null } }, { "name": "The hippo online", "room": "garage", "type": "binary_sensor", "id": { "entity_id": "binary_sensor.the_hippo_online", "device_id": null } }, { "name": "The hippo charger switch", "room": "garage", "type": "switch", "id": { "entity_id": "switch.the_hippo_charger", "device_id": null } }, { "name": "The hippo charge limit", "room": "garage", "type": "number", "id": { "entity_id": "number.the_hippo_charge_limit", "device_id": null } }, { "name": "Hippo departure input datetime", "room": "garage", "type": "input_datetime", "id": { "entity_id": "input_datetime.hippo_departure", "device_id": null } }, { "name": "The hippo charging", "room": "garage", "type": "binary_sensor", "id": { "entity_id": "binary_sensor.the_hippo_charging", "device_id": null } }, { "name": "The hippo scheduled departure", "room": "garage", "type": "binary_sensor", "id": { "entity_id": "binary_sensor.the_hippo_scheduled_departure", "device_id": null } }, { "name": "All", "room": null, "type": null, "id": { "entity_id": "all", "device_id": null } }, { "name": "Hippo Minimum Charge Script", "room": null, "type": "script", "id": { "entity_id": "script.hippo_minimum_charge", "device_id": null } }, { "name": "Turn On Script", "room": null, "type": "script", "id": { "entity_id": "script.turn_on", "device_id": null } }, { "name": "Next Hippo Departure", "room": null, "type": "sensor", "id": { "entity_id": "sensor.next_hippo_departure", "device_id": null } } ] }, { "id": "hippo_psi", "automation": "- id: hippo_psi\n alias: Check the Hippo tire pressure\n trigger:\n - platform: numeric_state\n entity_id:\n - sensor.the_hippo_tpms_front_right\n - sensor.the_hippo_tpms_rear_right\n - sensor.the_hippo_tpms_front_left\n - sensor.the_hippo_tpms_rear_left\n below: 37.5\n action:\n - service: notify.phones\n data_template:\n title: Below optimal tire pressure\n message: '{{ trigger.to_state.name }} is {{ trigger.to_state.state | round(2)\n }}'", "config": [ { "name": "The hippo tpms front right", "room": "garage", "type": "sensor", "id": { "entity_id": "sensor.the_hippo_tpms_front_right", "device_id": null } }, { "name": "The hippo tpms rear right", "room": "garage", "type": "sensor", "id": { "entity_id": "sensor.the_hippo_tpms_rear_right", "device_id": null } }, { "name": "The hippo tpms front left", "room": "garage", "type": "sensor", "id": { "entity_id": "sensor.the_hippo_tpms_front_left", "device_id": null } }, { "name": "The hippo tpms rear left", "room": "garage", "type": "sensor", "id": { "entity_id": "sensor.the_hippo_tpms_rear_left", "device_id": null } } ] }, { "id": "hottub_freezing", "automation": "- alias: Is the hottub going to freeze?\n id: hottub_freezing\n trigger:\n - platform: numeric_state\n entity_id: sensor.temperature_0d\n below: '32'\n condition:\n - condition: numeric_state\n entity_id: sensor.temperature_1d\n below: '32'\n - condition: numeric_state\n entity_id: sensor.temperature_2d\n below: '32'\n action:\n - service: notify.phones\n data:\n title: Freeze Warning\n message: 'Turn on Hot tub - future 12 hr period temps are: {{states(''sensor.temperature_0d'')\n }}/{{states(''sensor.temperature_1d'') }}/{{states(''sensor.temperature_2d'')\n }} {{ state_attr(''sensor.temperature_2d'', ''unit_of_measurement'') }}'", "config": [ { "name": "Temperature 0d", "room": "outside", "type": "sensor", "id": { "entity_id": "sensor.temperature_0d", "device_id": null } }, { "name": "Temperature 1d", "room": "outside", "type": "sensor", "id": { "entity_id": "sensor.temperature_1d", "device_id": null } }, { "name": "Temperature 2d", "room": "outside", "type": "sensor", "id": { "entity_id": "sensor.temperature_2d", "device_id": null } } ] }, { "id": "hvac_controls", "automation": "- alias: Display correct HVAC controls\n id: hvac_controls\n triggers:\n - trigger: state\n entity_id:\n - climate.home\n - climate.window_a_c\n from: 'off'\n conditions:\n - not:\n - condition: state\n entity_id: climate.home\n state: unknown\n - condition: state\n entity_id: climate.window_a_c\n state: unknown\n actions:\n - choose:\n - conditions: '{{ trigger.to_state.object_id == ''home'' }}'\n sequence:\n - service: switch.turn_on\n entity_id: switch.ac_or_furnace\n - service: climate.turn_off\n entity_id: climate.window_a_c\n - conditions: '{{ trigger.to_state.object_id == ''window_a_c'' }}'\n sequence:\n - service: switch.turn_off\n entity_id: switch.ac_or_furnace\n - service: climate.turn_off\n entity_id: climate.home", "config": [ { "name": "Home climate", "room": "home", "type": "climate", "id": { "entity_id": "climate.home", "device_id": null } }, { "name": "Window a c climate", "room": "home", "type": "climate", "id": { "entity_id": "climate.window_a_c", "device_id": null } }, { "name": "Ac or furnace switch", "room": "home", "type": "switch", "id": { "entity_id": "switch.ac_or_furnace", "device_id": null } } ] }, { "id": "kitchen_lights_sync", "automation": "- alias: Kitchen Lights Sync\n id: kitchen_lights_sync\n trigger:\n platform: state\n entity_id:\n - light.kitchen_light_1\n - light.kitchen_light_2\n from: 'on'\n to: 'off'\n for: 00:30:00\n condition:\n alias: If one of the kitchen lights still says it is on\n or:\n - condition: state\n entity_id: light.kitchen_light_1\n state: 'on'\n - condition: state\n entity_id: light.kitchen_light_2\n state: 'on'\n action:\n - service: light.turn_off\n entity_id:\n - light.kitchen_light_1\n - light.kitchen_light_2", "config": [ { "name": "Kitchen light 2", "room": "kitchen", "type": "light", "id": { "entity_id": "light.kitchen_light_2", "device_id": null } }, { "name": "Kitchen light 1", "room": "kitchen", "type": "light", "id": { "entity_id": "light.kitchen_light_1", "device_id": null } } ] }, { "id": "kitchen_movement", "automation": "- alias: Kitchen light - presence detected\n id: kitchen_movement\n initial_state: true\n trigger:\n - platform: state\n entity_id: binary_sensor.kitchen_presence_presence\n to: 'on'\n id: 'on'\n - platform: state\n entity_id: binary_sensor.kitchen_presence_presence\n to: 'off'\n id: 'off'\n for:\n minutes: 1\n action:\n - choose:\n - conditions:\n - condition: trigger\n id: 'on'\n - condition: state\n entity_id: light.all_kitchen_lights\n state: 'off'\n - condition: time\n before: '22:00:00'\n after: 05:00:00\n sequence:\n - action: light.turn_on\n data_template:\n entity_id: light.all_kitchen_lights\n transition: 2\n brightness: \"{%- if now().strftime('%H')|int >=19 -%}\\n {{3|int}}\\n{%-\\\n \\ elif now().strftime('%H')|int >=17 -%}\\n {{30|int}}\\n{%- elif now().strftime('%H')\\\n \\ |int >=8 -%}\\n {{100|int}}\\n{%- else -%}\\n {{20|int}}\\n{%- endif -%}\"\n - choose:\n - conditions:\n - condition: trigger\n id: 'off'\n sequence:\n - action: light.turn_off\n target:\n entity_id: light.all_kitchen_lights\n mode: single", "config": [ { "name": "Kitchen presence", "room": "kitchen", "type": "binary_sensor", "id": { "entity_id": "binary_sensor.kitchen_presence_presence", "device_id": null } }, { "name": "All kitchen lights", "room": "kitchen", "type": "light", "id": { "entity_id": "light.all_kitchen_lights", "device_id": null } }, { "name": "All", "room": null, "type": null, "id": { "entity_id": "all", "device_id": null } } ] }, { "id": "kitchen_switch_1_doubletap", "automation": "- alias: Kitchen Switch 1 Double Tap\n id: kitchen_switch_1_doubletap\n trigger:\n - platform: event\n event_type: zwave_js_value_notification\n event_data:\n device_id: 7d27e04aa4d14b076542e5b92dc999a0\n action:\n - service: light.turn_on\n data_template:\n brightness_pct: \"{% if trigger.event.data.value == 255 %}\\n 100\\n{% elif trigger.event.data.value\\\n \\ == 0 %}\\n 10\\n{% endif %}\\n\"\n entity_id: light.kitchen_light_1\n - service: light.turn_on\n data_template:\n brightness_pct: \"{% if trigger.event.data.value == 255 %}\\n 100\\n{% elif trigger.event.data.value\\\n \\ == 0 %}\\n 10\\n{% endif %}\\n\"\n entity_id: light.kitchen_light_2", "config": [ { "name": "Kitchen light 2", "room": "kitchen", "type": "light", "id": { "entity_id": "light.kitchen_light_2", "device_id": null } }, { "name": "Kitchen light 1", "room": "kitchen", "type": "light", "id": { "entity_id": "light.kitchen_light_1", "device_id": null } }, { "name": "Kitchen switch 1", "room": "kitchen", "type": "device", "id": { "entity_id": null, "device_id": "7d27e04aa4d14b076542e5b92dc999a0" } } ] }, { "id": "kitchen_switch_2_doubletap", "automation": "- alias: Kitchen Switch 2 Double Tap\n id: kitchen_switch_2_doubletap\n trigger:\n - platform: event\n event_type: zwave_js_value_notification\n event_data:\n device_id: 38f0169c956322eb2cb54645abc733be\n action:\n - service: light.turn_on\n data_template:\n brightness_pct: \"{% if trigger.event.data.value == 255 %}\\n 100\\n{% elif trigger.event.data.value\\\n \\ == 0 %}\\n 10\\n{% endif %}\\n\"\n entity_id: light.kitchen_light_2\n - service: light.turn_on\n data_template:\n brightness_pct: \"{% if trigger.event.data.value == 255 %}\\n 100\\n{% elif trigger.event.data.value\\\n \\ == 0 %}\\n 10\\n{% endif %}\\n\"\n entity_id: light.kitchen_light_1", "config": [ { "name": "Kitchen light 2", "room": "kitchen", "type": "light", "id": { "entity_id": "light.kitchen_light_2", "device_id": null } }, { "name": "Kitchen light 1", "room": "kitchen", "type": "light", "id": { "entity_id": "light.kitchen_light_1", "device_id": null } }, { "name": "Kitchen switch 2", "room": "kitchen", "type": "device", "id": { "entity_id": null, "device_id": "38f0169c956322eb2cb54645abc733be" } } ] }, { "id": "night_security_check", "automation": "- id: night_security_check\n alias: Check that the door is locked at night\n trigger:\n platform: state\n entity_id: group.all_lights\n from: 'on'\n to: 'off'\n condition:\n condition: time\n after: '19:00:00'\n before: 05:00:00\n action:\n - service: script.relock_front_door", "config": [ { "name": "All lights group", "room": "home", "type": "group", "id": { "entity_id": "group.all_lights", "device_id": null } }, { "name": "All", "room": null, "type": null, "id": { "entity_id": "all", "device_id": null } }, { "name": "Relock Front Door Script", "room": "Front Door", "type": "script", "id": { "entity_id": "script.relock_front_door", "device_id": null } } ] }, { "id": "office_movement", "automation": "- alias: Office light - presence detected\n id: office_movement\n trigger:\n - platform: state\n entity_id: binary_sensor.office_presence_presence\n to: 'on'\n id: 'on'\n - platform: state\n entity_id: binary_sensor.office_presence_presence\n to: 'off'\n id: 'off'\n for:\n minutes: 2\n action:\n - choose:\n - conditions:\n - condition: trigger\n id: 'on'\n - condition: state\n entity_id: light.office_light\n state: 'off'\n - condition: state\n entity_id: input_boolean.office_light_auto_on\n state: 'on'\n sequence:\n - action: light.turn_on\n data_template:\n entity_id: light.office_lamp\n transition: 2\n brightness: \"{%- if now().strftime('%H')|int >=19 -%}\\n {{3|int}}\\n{%-\\\n \\ elif now().strftime('%H')|int >=17 -%}\\n {{30|int}}\\n{%- elif now().strftime('%H')\\\n \\ |int >=8 -%}\\n {{100|int}}\\n{%- else -%}\\n {{20|int}}\\n{%- endif -%}\"\n - choose:\n - conditions:\n - condition: trigger\n id: 'on'\n - condition: state\n entity_id: light.office_light\n state: 'off'\n - condition: time\n before: '18:00:00'\n after: 08:00:00\n sequence:\n - action: light.turn_on\n data_template:\n entity_id: light.office_light\n transition: 2\n brightness: \"{%- if now().strftime('%H')|int >=19 -%}\\n {{3|int}}\\n\\\n {%- elif now().strftime('%H')|int >=17 -%}\\n {{30|int}}\\n{%- elif\\\n \\ now().strftime('%H') |int >=8 -%}\\n {{100|int}}\\n{%- else -%}\\n\\\n \\ {{20|int}}\\n{%- endif -%}\"\n - choose:\n - conditions:\n - condition: trigger\n id: 'off'\n - condition: state\n entity_id: input_boolean.office_light_auto_on\n state: 'on'\n sequence:\n - action: light.turn_off\n target:\n entity_id: light.office_light\n - action: light.turn_off\n target:\n entity_id: light.office_lamp\n mode: single", "config": [ { "name": "Office presence", "room": "office", "type": "binary_sensor", "id": { "entity_id": "binary_sensor.office_presence_presence", "device_id": null } }, { "name": "Office light", "room": "office", "type": "light", "id": { "entity_id": "light.office_light", "device_id": null } }, { "name": "Office light auto on", "room": "office", "type": "input_boolean", "id": { "entity_id": "input_boolean.office_light_auto_on", "device_id": null } }, { "name": "Office lamp", "room": "office", "type": "light", "id": { "entity_id": "light.office_lamp", "device_id": null } } ] }, { "id": "office_switch_doubletap", "automation": "- alias: Office Switch Double Tap\n id: office_switch_doubletap\n trigger:\n - platform: event\n event_type: zwave_js_value_notification\n event_data:\n device_id: 6adf396592828be8ab788674e9113f43\n action:\n - action: light.turn_on\n data_template:\n brightness_pct: \"{% if trigger.event.data.value == 255 %}\\n 100\\n{% elif trigger.event.data.value\\\n \\ == 0 %}\\n 10\\n{% endif %}\\n\"\n entity_id: light.office_light\n - action: input_boolean.turn_off\n target:\n entity_id: input_boolean.office_light_auto_on", "config": [ { "name": "Office light", "room": "office", "type": "light", "id": { "entity_id": "light.office_light", "device_id": null } }, { "name": "Office light auto on", "room": "office", "type": "input_boolean", "id": { "entity_id": "input_boolean.office_light_auto_on", "device_id": null } }, { "name": "Office switch", "room": "office", "type": "device", "id": { "entity_id": null, "device_id": "6adf396592828be8ab788674e9113f43" } } ] }, { "id": "office_switch_turned_off", "automation": "- alias: Office switch turned off\n id: office_switch_turned_off\n initial_state: 'on'\n trigger:\n - platform: state\n entity_id: light.office_light\n to: 'off'\n condition:\n - condition: state\n entity_id: input_boolean.office_light_auto_on\n state: 'off'\n action:\n - action: input_boolean.turn_on\n entity_id: input_boolean.office_light_auto_on", "config": [ { "name": "Office light", "room": "office", "type": "light", "id": { "entity_id": "light.office_light", "device_id": null } }, { "name": "Office light auto on", "room": "office", "type": "input_boolean", "id": { "entity_id": "input_boolean.office_light_auto_on", "device_id": null } } ] }, { "id": "open_windows", "automation": "- alias: Open the windows if it is cooler outside than in\n id: open_windows\n trigger:\n - platform: template\n value_template: '{{ (states(''sensor.kbfi_temperature'')|float(0)|round(0) - (states(''sensor.house_avg_temp'')|float(0)|round(0)\n | int) + 3 ) <= 0 }}'\n - platform: template\n value_template: '{{states(''sensor.temperature_1d'')| int(70) <= 60}}'\n condition:\n - '{{(states(''sensor.house_avg_temp'')|float(0)|round(0) | int(70)) >= 72 }}'\n - condition: sun\n after: sunset\n after_offset: -04:00:00\n - condition: time\n before: '22:00:00'\n - condition: state\n entity_id: group.presence\n state: home\n - condition: state\n entity_id: climate.home\n state: 'off'\n action:\n - if:\n - alias: Is it after 6pm?\n condition: time\n after: '18:00:00'\n then:\n - service: notify.phones\n data:\n title: Throw open the windows\n message: It is currently {{states('sensor.kbfi_temperature')|float(0)|round(0)\n | int}}°F outside and {{states('sensor.house_avg_temp')|float(0)|round(0)\n | int}}°F inside with an overnight low of {{states('sensor.temperature_0d')|\n int}}°F\n else:\n - service: notify.phones\n data:\n title: Throw open the windows\n message: It is currently {{states('sensor.kbfi_temperature')|float(0)|round(0)\n | int}}°F outside and {{states('sensor.house_avg_temp')|float(0)|round(0)\n | int}}°F inside with an overnight low of {{states('sensor.temperature_1d')|\n int}}°F", "config": [ { "name": "Presence group", "room": "home", "type": "group", "id": { "entity_id": "group.presence", "device_id": null } }, { "name": "Home climate", "room": "home", "type": "climate", "id": { "entity_id": "climate.home", "device_id": null } }, { "name": "Temperature 0d", "room": "outside", "type": "sensor", "id": { "entity_id": "sensor.temperature_0d", "device_id": null } }, { "name": "Temperature 1d", "room": "outside", "type": "sensor", "id": { "entity_id": "sensor.temperature_1d", "device_id": null } }, { "name": "Kbfi temperature", "room": "outside", "type": "sensor", "id": { "entity_id": "sensor.kbfi_temperature", "device_id": null } }, { "name": "House avg temp", "room": "home", "type": "sensor", "id": { "entity_id": "sensor.house_avg_temp", "device_id": null } } ] }, { "id": "plant_schedule_off", "automation": "- alias: Plant Schedule - Off\n id: plant_schedule_off\n trigger:\n - platform: time\n at: '19:45:00'\n condition:\n condition: state\n entity_id: group.plants\n state: 'on'\n action:\n service: homeassistant.turn_off\n entity_id: group.plants", "config": [ { "name": "Plants group", "room": "home", "type": "group", "id": { "entity_id": "group.plants", "device_id": null } } ] }, { "id": "plant_schedule_on", "automation": "- alias: Plant Schedule - On\n id: plant_schedule_on\n trigger:\n - platform: time\n at: 07:30:00\n condition:\n condition: state\n entity_id: group.plants\n state: 'off'\n action:\n - delay: '{{ iif(is_state(''binary_sensor.workday_sensor'', ''off''), ''01:00:00'',\n ''00:00:01'') }}'\n - service: homeassistant.turn_on\n entity_id: group.plants", "config": [ { "name": "Plants group", "room": "home", "type": "group", "id": { "entity_id": "group.plants", "device_id": null } }, { "name": "Workday sensor", "room": "home", "type": "binary_sensor", "id": { "entity_id": "binary_sensor.workday_sensor", "device_id": null } } ] }, { "id": "porch_light_door_open", "automation": "- alias: Turn on the porch light\n id: porch_light_door_open\n triggers:\n - trigger: state\n entity_id: binary_sensor.front_door_sensor_window_door_is_open\n from: 'off'\n to: 'on'\n - trigger: state\n entity_id: include ../../devices.yaml\n from: not_home\n to: home\n - trigger: state\n entity_id: lock.lock_front_door_lock\n from: locked\n to: unlocked\n condition:\n - condition: template\n value_template: '{{ state_attr(\"sun.sun\", \"elevation\") < 4 }}'\n - condition: state\n entity_id: switch.porch_light\n state: 'off'\n action:\n - service: switch.turn_on\n target:\n entity_id: switch.porch_light\n - wait_template: '{{ is_state(''binary_sensor.front_door_sensor_window_door_is_open'',\n ''off'') }}'\n timeout: 00:05:00\n - delay: 00:02:00\n - service: switch.turn_off\n target:\n entity_id: switch.porch_light", "config": [ { "name": "Front door lock", "room": "front_door", "type": "lock", "id": { "entity_id": "lock.lock_front_door_lock", "device_id": null } }, { "name": "Front door sensor", "room": "front_door", "type": "binary_sensor", "id": { "entity_id": "binary_sensor.front_door_sensor_window_door_is_open", "device_id": null } }, { "name": "Sun sun", "room": "outside", "type": "sensor", "id": { "entity_id": "sun.sun", "device_id": null } }, { "name": "Porch light switch", "room": "porch", "type": "switch", "id": { "entity_id": "switch.porch_light", "device_id": null } } ] }, { "id": "spare_bedroom_movement", "automation": "- alias: Spare Bedroom light - presence detected\n id: spare_bedroom_movement\n trigger:\n - platform: state\n entity_id: binary_sensor.spare_bedroom_presence_presence\n to: 'on'\n id: 'on'\n - platform: state\n entity_id: binary_sensor.spare_bedroom_presence_presence\n to: 'off'\n id: 'off'\n for:\n minutes: 1\n action:\n - choose:\n - conditions:\n - condition: trigger\n id: 'on'\n - condition: state\n entity_id: light.spare_bedroom_light\n state: 'off'\n - condition: state\n entity_id: input_boolean.spare_bedroom_light_auto_on\n state: 'on'\n sequence:\n - action: light.turn_on\n data_template:\n entity_id: light.spare_bedroom_light\n transition: 2\n brightness: \"{%- if now().strftime('%H')|int >=19 -%}\\n {{3|int}}\\n{%-\\\n \\ elif now().strftime('%H')|int >=17 -%}\\n {{30|int}}\\n{%- elif now().strftime('%H')\\\n \\ |int >=8 -%}\\n {{100|int}}\\n{%- else -%}\\n {{20|int}}\\n{%- endif -%}\"\n - choose:\n - conditions:\n - condition: trigger\n id: 'off'\n sequence:\n - action: light.turn_off\n target:\n entity_id: light.spare_bedroom_light\n mode: single", "config": [ { "name": "Spare bedroom presence", "room": "spare_bedroom", "type": "binary_sensor", "id": { "entity_id": "binary_sensor.spare_bedroom_presence_presence", "device_id": null } }, { "name": "Spare bedroom light", "room": "spare_bedroom", "type": "light", "id": { "entity_id": "light.spare_bedroom_light", "device_id": null } }, { "name": "Spare bedroom light auto on", "room": "spare_bedroom", "type": "input_boolean", "id": { "entity_id": "input_boolean.spare_bedroom_light_auto_on", "device_id": null } } ] }, { "id": "spare_bedroom_switch_double_tap", "automation": "- alias: Spare Bedroom Switch Double Tap\n id: spare_bedroom_switch_double_tap\n trigger:\n - platform: event\n event_type: zwave_js_value_notification\n event_data:\n device_id: 035feddac732eb4681d7fb3800f2fd56\n action:\n - service: light.turn_on\n data_template:\n brightness_pct: \"{% if trigger.event.data.value == 255 %}\\n 100\\n{% elif trigger.event.data.value\\\n \\ == 0 %}\\n 10\\n{% endif %}\\n\"\n entity_id: light.spare_bedroom_light", "config": [ { "name": "Spare bedroom light", "room": "spare_bedroom", "type": "light", "id": { "entity_id": "light.spare_bedroom_light", "device_id": null } }, { "name": "Spare bedroom switch", "room": "spare_bedroom", "type": "device", "id": { "entity_id": null, "device_id": "035feddac732eb4681d7fb3800f2fd56" } } ] }, { "id": "start_tv", "automation": "- alias: Start sound system when living room tv starts\n id: start_tv\n trigger:\n platform: state\n entity_id: remote.smart_tv_pro\n to: 'on'\n condition: null\n action:\n service: remote.send_command\n target:\n entity_id: remote.harmony_hub\n data:\n command:\n - PowerToggle\n device: 40193695", "config": [ { "name": "Smart tv pro remote", "room": "living_room", "type": "remote", "id": { "entity_id": "remote.smart_tv_pro", "device_id": null } }, { "name": "Harmony hub remote", "room": "living_room", "type": "remote", "id": { "entity_id": "remote.harmony_hub", "device_id": null } } ] }, { "id": "stop_tv", "automation": "- alias: Stop sound system when living room tv turns off\n id: stop_tv\n trigger:\n platform: state\n entity_id: remote.smart_tv_pro\n from: 'on'\n to: 'off'\n condition: null\n action:\n service: remote.send_command\n target:\n entity_id: remote.harmony_hub\n data:\n command:\n - PowerToggle\n device: 40193695", "config": [ { "name": "Smart tv pro remote", "room": "living_room", "type": "remote", "id": { "entity_id": "remote.smart_tv_pro", "device_id": null } }, { "name": "Harmony hub remote", "room": "living_room", "type": "remote", "id": { "entity_id": "remote.harmony_hub", "device_id": null } } ] }, { "id": "stop_tv_auto", "automation": "- alias: Turn off TV\n id: stop_tv_auto\n trigger:\n - platform: state\n entity_id: media_player.living_room_tv\n to: unavailable\n for:\n minutes: 3\n - platform: state\n entity_id: media_player.living_room_tv\n to: 'off'\n for:\n minutes: 10\n - platform: state\n entity_id: media_player.living_room_tv\n to: idle\n for:\n minutes: 30\n condition:\n - condition: and\n conditions:\n - condition: state\n entity_id: remote.harmony_hub\n state: 'on'\n - condition: not\n conditions:\n - condition: state\n entity_id: media_player.plex_living_room_tv\n state: playing\n action:\n - service: remote.turn_off\n entity_id: remote.harmony_hub", "config": [ { "name": "Harmony hub remote", "room": "living_room", "type": "remote", "id": { "entity_id": "remote.harmony_hub", "device_id": null } }, { "name": "Living room tv media player", "room": "living_room", "type": "media_player", "id": { "entity_id": "media_player.living_room_tv", "device_id": null } }, { "name": "Plex living room tv", "room": "living_room", "type": "media_player", "id": { "entity_id": "media_player.plex_living_room_tv", "device_id": null } } ] }, { "id": "trevor_sunrise_alarm", "automation": "- alias: Trevor Sunrise Alarm\n id: trevor_sunrise_alarm\n trigger:\n - platform: mqtt\n topic: trevor/alarm\n action:\n - service: homeassistant.turn_on\n entity_id: script.coffee_start\n - choose:\n - conditions:\n - condition: state\n entity_id: input_boolean.one_two_lamps\n state: 'on'\n sequence:\n - service: light.turn_on\n entity_id: light.bedroom_color_2\n data:\n brightness_pct: 1\n rgb_color:\n - 255\n - 0\n - 0\n - service: light.turn_on\n entity_id: light.bedroom_color_1\n data:\n brightness_pct: 1\n rgb_color:\n - 255\n - 0\n - 0\n - delay: 00:00:10\n - choose:\n - conditions:\n - condition: state\n entity_id: input_boolean.one_two_lamps\n state: 'on'\n sequence:\n - service: light.turn_on\n entity_id: light.bedroom_color_2\n data:\n brightness_pct: 100\n color_temp_kelvin: 2700\n transition: 260\n - service: input_boolean.turn_off\n entity_id: input_boolean.one_two_lamps\n - service: light.turn_on\n entity_id: light.bedroom_color_1\n data:\n brightness_pct: 100\n color_temp_kelvin: 2700\n transition: 260", "config": [ { "name": "One two lamps input boolean", "room": "bedroom", "type": "input_boolean", "id": { "entity_id": "input_boolean.one_two_lamps", "device_id": null } }, { "name": "Bedroom color 2", "room": "bedroom", "type": "light", "id": { "entity_id": "light.bedroom_color_2", "device_id": null } }, { "name": "Bedroom color 1", "room": "bedroom", "type": "light", "id": { "entity_id": "light.bedroom_color_1", "device_id": null } }, { "name": "Coffee Start Script", "room": "Kitchen", "type": "script", "id": { "entity_id": "script.coffee_start", "device_id": null } } ] }, { "id": "sunset_response", "automation": "- alias: it is getting dark\n id: sunset_response\n trigger:\n platform: sun\n event: sunset\n offset: -00:45:00\n condition:\n - condition: state\n entity_id: group.presence\n state: home\n - condition: state\n entity_id: light.dining_lights\n state: 'off'\n - condition: time\n before: '20:00:00'\n action:\n - service: light.turn_on\n entity_id: light.dining_lights\n data:\n brightness_pct: 1\n - delay: 00:00:01\n - service: light.turn_on\n entity_id: light.dining_lights\n data:\n brightness_pct: 100\n transition: 900", "config": [ { "name": "Presence group", "room": "home", "type": "group", "id": { "entity_id": "group.presence", "device_id": null } }, { "name": "Dining lights", "room": "dining", "type": "light", "id": { "entity_id": "light.dining_lights", "device_id": null } } ] }, { "id": "theme_set", "automation": "- alias: Set theme at startup, sunrise, and sunset\n id: theme_set\n triggers:\n - trigger: homeassistant\n event: start\n - trigger: numeric_state\n entity_id: sun.sun\n attribute: elevation\n above: 4\n - trigger: numeric_state\n entity_id: sun.sun\n attribute: elevation\n below: 4\n action:\n - if:\n - alias: Is it day or night\n condition: numeric_state\n entity_id: sun.sun\n attribute: elevation\n above: 4\n then:\n - service: frontend.set_theme\n data:\n name: Google Theme Light\n mode: dark\n else:\n - service: frontend.set_theme\n data:\n name: Google Theme Dark\n mode: dark", "config": [ { "name": "Sun sun", "room": "outside", "type": "sensor", "id": { "entity_id": "sun.sun", "device_id": null } } ] }, { "id": "update_groups_all", "automation": "- alias: Update groups\n id: update_groups_all\n trigger:\n platform: homeassistant\n event: start\n action:\n service: script.update_all_lights_group", "config": [ { "name": "All", "room": null, "type": null, "id": { "entity_id": "all", "device_id": null } }, { "name": "Update All Lights Group Script", "room": null, "type": "script", "id": { "entity_id": "script.update_all_lights_group", "device_id": null } } ] }, { "id": "goodbye_sequence", "automation": "- alias: Goodbye Sequence\n id: goodbye_sequence\n trigger:\n platform: state\n entity_id: group.presence\n from: home\n to: not_home\n action:\n - if:\n - alias: Is the door open\n condition: state\n entity_id: binary_sensor.front_door_sensor_window_door_is_open\n state: 'on'\n - alias: Is the door sensor live and updating\n condition: template\n value_template: '{{ (utcnow() | as_timestamp - states(''sensor.front_door_sensor_last_seen'')|\n as_timestamp) | int(0) < 7200 }}'\n then:\n - action: notify.phones\n data:\n title: The front door might be open\n message: The last person just left but the door sensor, last seen {{ (((utcnow()\n | as_timestamp - states('sensor.front_door_sensor_last_seen')| as_timestamp)\n | int(0))/60 )| round(0)}} minutes ago, says it is still open\n else:\n - action: light.turn_off\n entity_id: all\n - service: script.relock_front_door", "config": [ { "name": "Front door sensor", "room": "front_door", "type": "binary_sensor", "id": { "entity_id": "binary_sensor.front_door_sensor_window_door_is_open", "device_id": null } }, { "name": "Presence group", "room": "home", "type": "group", "id": { "entity_id": "group.presence", "device_id": null } }, { "name": "Front door sensor last seen", "room": "front_door", "type": "sensor", "id": { "entity_id": "sensor.front_door_sensor_last_seen", "device_id": null } }, { "name": "All", "room": null, "type": null, "id": { "entity_id": "all", "device_id": null } }, { "name": "Relock Front Door Script", "room": "Front Door", "type": "script", "id": { "entity_id": "script.relock_front_door", "device_id": null } } ] }, { "id": "zwave_battery_update", "automation": "- alias: Update Z-Wave battery levels\n id: zwave_battery_update\n trigger:\n - platform: time\n at: 03:00:00\n condition: '{{ (as_timestamp(now()) / 86400) | int % 3 == 1 }}'\n action:\n - service: zwave_js.refresh_value\n data:\n entity_id: \"{%- set find_integration = 'zwave_js' %} {% set entities = states\\\n \\ | map(attribute='entity_id') | list %} {%- set ns = namespace(entities =\\\n \\ []) %} {%- for entity_id in entities %}\\n {% if 'battery' in entity_id\\\n \\ %}\\n {%- set ids = device_attr(entity_id, 'identifiers') %}\\n {%-\\\n \\ if ids %}\\n {%- set ids = ids | list | first %}\\n {%- if ids and\\\n \\ ids | length == 2 and ids[0] == find_integration %}\\n {%- set ns.entities\\\n \\ = ns.entities + [ entity_id ] %}\\n {%- endif %}\\n {%- endif %}\\n\\\n \\ {%- endif %}\\n{%- endfor %} {{ ns.entities }}\\n\"\n refresh_all_values: true\n mode: single", "config": [ { "name": "All", "room": null, "type": null, "id": { "entity_id": "all", "device_id": null } } ] } ]