AutomationDataset/matt-sullivan/description-ready.json

1250 lines
48 KiB
JSON

[
{
"id": "holiday_lights_prevent_too_dim",
"automation": "- id: holiday_lights_prevent_too_dim\n alias: Random Holiday Lights Prevent Too Dim\n trigger:\n - platform: state\n entity_id:\n - light.kids_long_w\n from: 'off'\n to: 'on'\n condition:\n - condition: state\n entity_id: group.family\n state: not_home\n - condition: time\n before: input_datetime.holiday_lights_bedtime\n action:\n - service: light.turn_on\n target:\n entity_id: light.kids_long_w\n data:\n brightness: 150",
"config": [
{
"name": "kids long wall light",
"room": "kids",
"type": "light",
"id": {
"entity_id": "light.kids_long_w",
"device_id": null
}
},
{
"name": "family group",
"room": null,
"type": "group",
"id": {
"entity_id": "group.family",
"device_id": null
}
},
{
"name": "holiday lights bedtime",
"room": null,
"type": "input_datetime",
"id": {
"entity_id": "input_datetime.holiday_lights_bedtime",
"device_id": null
}
}
]
},
{
"id": "'1643034412279'",
"automation": "- id: '1643034412279'\n alias: Welcome Lights\n description: ''\n trigger:\n - platform: state\n entity_id: group.family\n from: away\n to: home\n condition:\n - condition: state\n entity_id: sun.sun\n state: below_horizon\n action:\n - service: homeassistant.turn_on\n target:\n entity_id: group.welcome_lights\n - service: notify.parents\n data:\n message: Welcome lights turned on at {{now().strftime(\"%H:%M\")}}",
"config": [
{
"name": "family group",
"room": null,
"type": "group",
"id": {
"entity_id": "group.family",
"device_id": null
}
},
{
"name": "sun",
"room": null,
"type": "sun",
"id": {
"entity_id": "sun.sun",
"device_id": null
}
},
{
"name": "welcome lights group",
"room": null,
"type": "group",
"id": {
"entity_id": "group.welcome_lights",
"device_id": null
}
},
{
"name": "parents notification",
"room": null,
"type": "notify",
"id": {
"entity_id": "notify.parents",
"device_id": null
}
}
]
},
{
"id": "debug_matt_location",
"automation": "- id: debug_matt_location\n alias: Debug matt location\n trigger:\n - platform: state\n entity_id: device_tracker.matt_pixel_8_pro\n not_from: null\n action:\n - service: notify.mobile_app_matt_pixel_8_pro\n data:\n message: Matt is at {{states('device_tracker.matt_pixel_8_pro')}} at {{now().strftime(\"%H:%M\")}}",
"config": [
{
"name": "matt pixel 8 pro tracker",
"room": null,
"type": "device_tracker",
"id": {
"entity_id": "device_tracker.matt_pixel_8_pro",
"device_id": null
}
},
{
"name": "matt pixel 8 pro notification",
"room": null,
"type": "notify",
"id": {
"entity_id": "notify.mobile_app_matt_pixel_8_pro",
"device_id": null
}
}
]
},
{
"id": "open_garage_matt",
"automation": "- id: open_garage_matt\n alias: Open garage when Matt drives home\n trigger:\n - platform: state\n entity_id: device_tracker.matt_pixel_8_pro\n from: not_home\n to:\n - home\n - HomeStreet1\n - HomeStreet2\n condition:\n - condition: state\n alias: Garage closed\n entity_id: cover.garage_door\n state: closed\n - condition: template\n alias: Phone connected to car\n value_template: '{{state_attr(''sensor.matt_pixel_8_pro_bluetooth_connection'',\n ''connected_paired_devices'') | contains(''B8:9F:09:62:F7:7F (BMW 93379)'')\n or state_attr(''sensor.matt_pixel_8_pro_bluetooth_connection'', ''connected_paired_devices'')\n | contains(''00:02:5B:BE:23:C0 (CAR6509)'') or state_attr(''sensor.matt_pixel_8_pro_bluetooth_connection'',\n ''connected_paired_devices'') | contains(''00:0A:30:92:D6:C7 (Mazda)'')}}'\n action:\n - service: cover.stop_cover\n target:\n entity_id: cover.garage_door\n - service: notify.mobile_app_matt_pixel_8_pro\n data:\n message: Matt arrived home, opening garage at {{now().strftime(\"%H:%M\")}}",
"config": [
{
"name": "matt pixel 8 pro tracker",
"room": null,
"type": "device_tracker",
"id": {
"entity_id": "device_tracker.matt_pixel_8_pro",
"device_id": null
}
},
{
"name": "matt pixel 8 pro notification",
"room": null,
"type": "notify",
"id": {
"entity_id": "notify.mobile_app_matt_pixel_8_pro",
"device_id": null
}
},
{
"name": "garage door",
"room": "garage",
"type": "cover",
"id": {
"entity_id": "cover.garage_door",
"device_id": null
}
},
{
"name": "matt pixel 8 pro bluetooth connection",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.matt_pixel_8_pro_bluetooth_connection",
"device_id": null
}
}
]
},
{
"id": "open_garage_sara",
"automation": "- id: open_garage_sara\n alias: Open garage when Sara drives home\n trigger:\n - platform: state\n entity_id:\n - device_tracker.saras_iphone_app\n from: not_home\n to:\n - home\n - HomeStreet1\n - HomeStreet2\n condition:\n - condition: state\n alias: Garage closed\n entity_id: cover.garage_door\n state: closed\n - condition: template\n alias: Phone connected to car\n value_template: '{{states(''sensor.saras_iphone14_ssid'') == ''DIRECT-BMW 93379''}}'\n action:\n - service: cover.stop_cover\n target:\n entity_id: cover.garage_door\n - service: notify.mobile_app_matt_pixel_8_pro\n data:\n message: Sara arrived home, opening garage at {{now().strftime(\"%H:%M\")}}\n - service: notify.mobile_app_saras_iphone_2\n data:\n message: Sara arrived home, opening garage at {{now().strftime(\"%H:%M\")}}",
"config": [
{
"name": "matt pixel 8 pro notification",
"room": null,
"type": "notify",
"id": {
"entity_id": "notify.mobile_app_matt_pixel_8_pro",
"device_id": null
}
},
{
"name": "garage door",
"room": "garage",
"type": "cover",
"id": {
"entity_id": "cover.garage_door",
"device_id": null
}
},
{
"name": "sara iphone tracker",
"room": null,
"type": "device_tracker",
"id": {
"entity_id": "device_tracker.saras_iphone_app",
"device_id": null
}
},
{
"name": "sara iphone ssid",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.saras_iphone14_ssid",
"device_id": null
}
},
{
"name": "sara iphone notification",
"room": null,
"type": "notify",
"id": {
"entity_id": "notify.mobile_app_saras_iphone_2",
"device_id": null
}
}
]
},
{
"id": "garage_left_open_warn",
"automation": "- id: garage_left_open_warn\n alias: Send a warning if the garage left open\n trigger:\n - platform: template\n value_template: '{{ not(is_state(''cover.garage_door'', ''closed''))}}'\n for: 00:05:00\n action:\n - service: notify.parents\n data:\n message: Garage left open! At {{now().strftime(\"%H:%M\")}}",
"config": [
{
"name": "parents notification",
"room": null,
"type": "notify",
"id": {
"entity_id": "notify.parents",
"device_id": null
}
},
{
"name": "garage door",
"room": "garage",
"type": "cover",
"id": {
"entity_id": "cover.garage_door",
"device_id": null
}
}
]
},
{
"id": "garage_monitoring",
"automation": "- id: garage_monitoring\n alias: Debug garage open & close\n trigger:\n - platform: state\n entity_id: cover.garage_door\n action:\n - service: notify.mobile_app_matt_pixel_8_pro\n data:\n message: Garage is {{states.cover.garage_door.state}} at {{now().strftime(\"%H:%M\")}}",
"config": [
{
"name": "matt pixel 8 pro notification",
"room": null,
"type": "notify",
"id": {
"entity_id": "notify.mobile_app_matt_pixel_8_pro",
"device_id": null
}
},
{
"name": "garage door",
"room": "garage",
"type": "cover",
"id": {
"entity_id": "cover.garage_door",
"device_id": null
}
}
]
},
{
"id": "sensor_lights",
"automation": "- id: sensor_lights\n alias: Sensor Lights\n description: Sensor lights combining both sensors and lights\n trigger:\n - platform: state\n entity_id: binary_sensor.lumi_lumi_motion_ac02_iaszone\n to: 'on'\n - platform: state\n entity_id: binary_sensor.front_yard_motion3_motion\n to: 'on'\n condition:\n - condition: numeric_state\n entity_id: sun.sun\n attribute: elevation\n below: 0\n action:\n - alias: Turn on the light\n service: light.turn_on\n target:\n entity_id:\n - light.front_yard_sensor_light\n - light.mailbox\n - light.bin_light\n data: {}\n - alias: Set bin light colour\n service: light.turn_on\n target:\n entity_id: light.bin_light\n data:\n brightness: 255\n hs_color: \"{% if is_state('sensor.brisbane_bin_day_recycle', 'on') %}\\n [60,60]\\n\\\n {% elif is_state('sensor.brisbane_bin_day', 'on') %}\\n [128,33]\\n{% else\\\n \\ %}\\n [0,0]\\n{% endif %}\"\n - alias: Wait until there is no motion from either device\n wait_template: '{{ not(is_state(''binary_sensor.lumi_lumi_motion_ac02_iaszone'',\n ''on'')) and not(is_state(''binary_sensor.front_yard_motion3_motion'', ''on''))\n }}'\n - alias: Wait a while longer\n delay:\n hours: 0\n minutes: 2\n seconds: 0\n milliseconds: 0\n - alias: Turn off the light\n service: light.turn_off\n target:\n entity_id:\n - light.front_yard_sensor_light\n - light.mailbox\n - light.bin_light\n data: {}\n mode: restart",
"config": [
{
"name": "sun",
"room": null,
"type": "sun",
"id": {
"entity_id": "sun.sun",
"device_id": null
}
},
{
"name": "lumi motion sensor",
"room": null,
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.lumi_lumi_motion_ac02_iaszone",
"device_id": null
}
},
{
"name": "front yard motion 3",
"room": "front yard",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.front_yard_motion3_motion",
"device_id": null
}
},
{
"name": "front yard sensor light",
"room": "front yard",
"type": "light",
"id": {
"entity_id": "light.front_yard_sensor_light",
"device_id": null
}
},
{
"name": "mailbox light",
"room": "front yard",
"type": "light",
"id": {
"entity_id": "light.mailbox",
"device_id": null
}
},
{
"name": "bin light",
"room": "front yard",
"type": "light",
"id": {
"entity_id": "light.bin_light",
"device_id": null
}
},
{
"name": "brisbane bin day recycle",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.brisbane_bin_day_recycle",
"device_id": null
}
},
{
"name": "brisbane bin day",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.brisbane_bin_day",
"device_id": null
}
}
]
},
{
"id": "'1720934399141'",
"automation": "- id: '1720934399141'\n alias: Light Back On - Emily Sign\n description: ''\n trigger:\n - platform: state\n entity_id:\n - light.emily_sign\n to: 'off'\n for:\n hours: 0\n minutes: 0\n seconds: 2\n condition: []\n action:\n - service: light.turn_on\n metadata: {}\n data: {}\n target:\n entity_id: light.emily_sign\n mode: single",
"config": [
{
"name": "emily sign light",
"room": "emily",
"type": "light",
"id": {
"entity_id": "light.emily_sign",
"device_id": null
}
}
]
},
{
"id": "'1720934399142'",
"automation": "- id: '1720934399142'\n alias: Light Back On - Emily Makeup\n description: ''\n trigger:\n - platform: state\n entity_id:\n - light.emily_makeup\n to: 'off'\n for:\n hours: 0\n minutes: 0\n seconds: 2\n condition: []\n action:\n - service: light.turn_on\n metadata: {}\n data: {}\n target:\n entity_id: light.emily_makeup\n mode: single",
"config": [
{
"name": "emily makeup light",
"room": "emily",
"type": "light",
"id": {
"entity_id": "light.emily_makeup",
"device_id": null
}
}
]
},
{
"id": "'1745786335394'",
"automation": "- id: '1745786335394'\n alias: EmilyButton1-ReadingTime\n description: ''\n triggers:\n - device_id: 2d52c62b1bbcd0ec31a5901f9fcfa4ee\n domain: zha\n type: remote_button_short_press\n subtype: button_1\n trigger: device\n conditions: []\n actions:\n - action: script.emily_reading_time\n metadata: {}\n data: {}\n mode: single",
"config": [
{
"name": "emily remote",
"room": "emily",
"type": "device",
"id": {
"entity_id": null,
"device_id": "2d52c62b1bbcd0ec31a5901f9fcfa4ee"
}
},
{
"name": "emily reading time script",
"room": "emily",
"type": "script",
"id": {
"entity_id": "script.emily_reading_time",
"device_id": null
}
}
]
},
{
"id": "'1745786392915'",
"automation": "- id: '1745786392915'\n alias: EmilyButton2-SleepTime\n description: ''\n triggers:\n - device_id: 2d52c62b1bbcd0ec31a5901f9fcfa4ee\n domain: zha\n type: remote_button_short_press\n subtype: button_2\n trigger: device\n conditions: []\n actions:\n - action: script.turn_on\n metadata: {}\n data: {}\n target:\n entity_id: script.emily_sleep_time\n mode: single",
"config": [
{
"name": "emily remote",
"room": "emily",
"type": "device",
"id": {
"entity_id": null,
"device_id": "2d52c62b1bbcd0ec31a5901f9fcfa4ee"
}
},
{
"name": "emily sleep time script",
"room": "emily",
"type": "script",
"id": {
"entity_id": "script.emily_sleep_time",
"device_id": null
}
}
]
},
{
"id": "'1745786735917'",
"automation": "- id: '1745786735917'\n alias: EmilyButton3-RgbLights\n description: ''\n triggers:\n - device_id: 2d52c62b1bbcd0ec31a5901f9fcfa4ee\n domain: zha\n type: remote_button_short_press\n subtype: button_3\n trigger: device\n conditions: []\n actions:\n - action: light.toggle\n metadata: {}\n data: {}\n target:\n entity_id: light.emily_rgb_strip\n mode: single",
"config": [
{
"name": "emily remote",
"room": "emily",
"type": "device",
"id": {
"entity_id": null,
"device_id": "2d52c62b1bbcd0ec31a5901f9fcfa4ee"
}
},
{
"name": "emily rgb strip",
"room": "emily",
"type": "light",
"id": {
"entity_id": "light.emily_rgb_strip",
"device_id": null
}
}
]
},
{
"id": "'1745786785985'",
"automation": "- id: '1745786785985'\n alias: EmilyButton4-Kitchen\n description: ''\n triggers:\n - device_id: 2d52c62b1bbcd0ec31a5901f9fcfa4ee\n domain: zha\n type: remote_button_short_press\n subtype: button_4\n trigger: device\n conditions: []\n actions:\n - action: light.toggle\n metadata: {}\n data: {}\n target:\n entity_id: light.kitchen\n mode: single",
"config": [
{
"name": "emily remote",
"room": "emily",
"type": "device",
"id": {
"entity_id": null,
"device_id": "2d52c62b1bbcd0ec31a5901f9fcfa4ee"
}
},
{
"name": "kitchen light",
"room": "kitchen",
"type": "light",
"id": {
"entity_id": "light.kitchen",
"device_id": null
}
}
]
},
{
"id": "'1745787427449'",
"automation": "- id: '1745787427449'\n alias: TobyButton1-Reading\n description: ''\n triggers:\n - device_id: 5582c9a1d80e85a86f9d66ca5f750b98\n domain: zha\n type: remote_button_short_press\n subtype: button_1\n trigger: device\n conditions: []\n actions:\n - action: script.toby_reading_time\n metadata: {}\n data: {}\n mode: single",
"config": [
{
"name": "toby remote",
"room": "toby",
"type": "device",
"id": {
"entity_id": null,
"device_id": "5582c9a1d80e85a86f9d66ca5f750b98"
}
},
{
"name": "toby reading time script",
"room": "toby",
"type": "script",
"id": {
"entity_id": "script.toby_reading_time",
"device_id": null
}
}
]
},
{
"id": "'1745787483164'",
"automation": "- id: '1745787483164'\n alias: TobyButton2-Sleep\n description: ''\n triggers:\n - device_id: 5582c9a1d80e85a86f9d66ca5f750b98\n domain: zha\n type: remote_button_short_press\n subtype: button_2\n trigger: device\n conditions: []\n actions:\n - action: script.turn_on\n metadata: {}\n data: {}\n target:\n entity_id: script.toby_sleep_time\n mode: single",
"config": [
{
"name": "toby remote",
"room": "toby",
"type": "device",
"id": {
"entity_id": null,
"device_id": "5582c9a1d80e85a86f9d66ca5f750b98"
}
},
{
"name": "toby sleep time script",
"room": "toby",
"type": "script",
"id": {
"entity_id": "script.toby_sleep_time",
"device_id": null
}
}
]
},
{
"id": "'1745787544962'",
"automation": "- id: '1745787544962'\n alias: TobyButton3-FrogLight\n description: ''\n triggers:\n - device_id: 5582c9a1d80e85a86f9d66ca5f750b98\n domain: zha\n type: remote_button_short_press\n subtype: button_3\n trigger: device\n conditions: []\n actions:\n - action: light.toggle\n metadata: {}\n data: {}\n target:\n entity_id: light.tobyfroglight\n mode: single",
"config": [
{
"name": "toby remote",
"room": "toby",
"type": "device",
"id": {
"entity_id": null,
"device_id": "5582c9a1d80e85a86f9d66ca5f750b98"
}
},
{
"name": "toby frog light",
"room": "toby",
"type": "light",
"id": {
"entity_id": "light.tobyfroglight",
"device_id": null
}
}
]
},
{
"id": "'1745787601152'",
"automation": "- id: '1745787601152'\n alias: TobyButton4-Hallway\n description: ''\n triggers:\n - device_id: 5582c9a1d80e85a86f9d66ca5f750b98\n domain: zha\n type: remote_button_short_press\n subtype: button_4\n trigger: device\n conditions: []\n actions:\n - action: light.toggle\n metadata: {}\n data: {}\n target:\n entity_id: group.hallway_lights\n mode: single",
"config": [
{
"name": "toby remote",
"room": "toby",
"type": "device",
"id": {
"entity_id": null,
"device_id": "5582c9a1d80e85a86f9d66ca5f750b98"
}
},
{
"name": "hallway lights group",
"room": "hallway",
"type": "group",
"id": {
"entity_id": "group.hallway_lights",
"device_id": null
}
}
]
},
{
"id": "'1745847668003'",
"automation": "- id: '1745847668003'\n alias: EntryLongPress-LeavingHome\n description: ''\n triggers:\n - trigger: state\n entity_id:\n - event.lights_entry_button_1\n conditions:\n - condition: state\n entity_id: event.lights_entry_button_1\n attribute: event_type\n state: Long Press\n actions:\n - action: script.turn_on\n target:\n entity_id: script.leaving_home\n mode: single",
"config": [
{
"name": "entry button event",
"room": "entry",
"type": "event",
"id": {
"entity_id": "event.lights_entry_button_1",
"device_id": null
}
},
{
"name": "leaving home script",
"room": null,
"type": "script",
"id": {
"entity_id": "script.leaving_home",
"device_id": null
}
}
]
},
{
"id": "EmilyLongPress-AllOff",
"automation": "- id: EmilyLongPress-AllOff\n alias: EmilyLongPress-AllOff\n description: ''\n triggers:\n - trigger: state\n entity_id:\n - event.lights_emily_button_1\n conditions:\n - condition: state\n entity_id: event.lights_emily_button_1\n attribute: event_type\n state: Long Press\n actions:\n - action: script.turn_on\n target:\n entity_id: script.emily_all_off\n mode: single",
"config": [
{
"name": "emily button event",
"room": "emily",
"type": "event",
"id": {
"entity_id": "event.lights_emily_button_1",
"device_id": null
}
},
{
"name": "emily all off script",
"room": "emily",
"type": "script",
"id": {
"entity_id": "script.emily_all_off",
"device_id": null
}
}
]
},
{
"id": "TobyLongPress-AllOff",
"automation": "- id: TobyLongPress-AllOff\n alias: TobyLongPress-AllOff\n description: ''\n triggers:\n - trigger: state\n entity_id:\n - event.lights_toby_button_1\n conditions:\n - condition: state\n entity_id: event.lights_toby_button_1\n attribute: event_type\n state: Long Press\n actions:\n - action: script.turn_on\n target:\n entity_id: script.toby_all_off\n mode: single",
"config": [
{
"name": "toby button event",
"room": "toby",
"type": "event",
"id": {
"entity_id": "event.lights_toby_button_1",
"device_id": null
}
},
{
"name": "toby all off script",
"room": "toby",
"type": "script",
"id": {
"entity_id": "script.toby_all_off",
"device_id": null
}
}
]
},
{
"id": "fc_ok",
"automation": "- id: fc_ok\n alias: FC OK\n initial_state: true\n trigger:\n platform: numeric_state\n entity_id: sensor.e_fc\n above: 0.6\n below: 5.0\n for:\n minutes: 1\n condition: []\n action:\n - service: frontend.set_theme\n data:\n name: default",
"config": [
{
"name": "fc sensor",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.e_fc",
"device_id": null
}
}
]
},
{
"id": "fc_high",
"automation": "- id: fc_high\n alias: FC too high\n initial_state: true\n trigger:\n platform: numeric_state\n entity_id: sensor.e_fc\n above: 5.01\n for:\n minutes: 1\n condition: []\n action:\n - service: frontend.set_theme\n data:\n name: danger",
"config": [
{
"name": "fc sensor",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.e_fc",
"device_id": null
}
}
]
},
{
"id": "fc_low",
"automation": "- id: fc_low\n alias: FC too low\n initial_state: true\n trigger:\n platform: numeric_state\n entity_id: sensor.e_fc\n below: 0.59\n for:\n minutes: 1\n condition: []\n action:\n - service: frontend.set_theme\n data:\n name: algae",
"config": [
{
"name": "fc sensor",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.e_fc",
"device_id": null
}
}
]
},
{
"id": "fc_target",
"automation": "- id: fc_target\n alias: FC set target\n initial_state: true\n trigger:\n - platform: state\n entity_id: input_number.fc_target\n condition: []\n action:\n - service: automation.trigger\n entity_id: automation.bleach_set",
"config": [
{
"name": "fc target input",
"room": null,
"type": "input_number",
"id": {
"entity_id": "input_number.fc_target",
"device_id": null
}
},
{
"name": "bleach set automation",
"room": null,
"type": "automation",
"id": {
"entity_id": "automation.bleach_set",
"device_id": null
}
}
]
},
{
"id": "holiday_lights_reset",
"automation": "- id: holiday_lights_reset\n alias: Random Holiday Reset Next Time At Dusk\n trigger:\n - platform: numeric_state\n entity_id: sun.sun\n attribute: elevation\n below: 1.0\n action:\n - choose:\n - conditions:\n - condition: state\n entity_id: group.family\n state: not_home\n sequence:\n - alias: Turn on lounge\n service: homeassistant.turn_on\n target:\n entity_id: light.lounge\n - service: input_datetime.set_datetime\n data_template:\n entity_id: input_datetime.holiday_lights_starttime\n time: '{{ now().strftime(''%H:%M:00'') }}'\n - service: input_datetime.set_datetime\n data_template:\n entity_id: input_datetime.holiday_lights_next_change\n time: '{{ (now() + timedelta(minutes=(range(30,45) | random | int))).strftime(''%H:%M:00'')\n }}'",
"config": [
{
"name": "family group",
"room": null,
"type": "group",
"id": {
"entity_id": "group.family",
"device_id": null
}
},
{
"name": "sun",
"room": null,
"type": "sun",
"id": {
"entity_id": "sun.sun",
"device_id": null
}
},
{
"name": "holiday lights starttime",
"room": null,
"type": "input_datetime",
"id": {
"entity_id": "input_datetime.holiday_lights_starttime",
"device_id": null
}
},
{
"name": "holiday lights next change",
"room": null,
"type": "input_datetime",
"id": {
"entity_id": "input_datetime.holiday_lights_next_change",
"device_id": null
}
},
{
"name": "lounge light",
"room": "lounge",
"type": "light",
"id": {
"entity_id": "light.lounge",
"device_id": null
}
}
]
},
{
"id": "holiday_lights_toggle",
"automation": "- id: holiday_lights_toggle\n alias: Random Holiday Lights Toggle\n trigger:\n - platform: state\n entity_id:\n - group.family\n to: not_home\n - platform: time\n at: input_datetime.holiday_lights_next_change\n condition:\n - condition: state\n entity_id: group.family\n state: not_home\n - condition: time\n after: input_datetime.holiday_lights_starttime\n - condition: time\n before: input_datetime.holiday_lights_bedtime\n action:\n - alias: Loop to change lights, but ensure at least one on\n repeat:\n sequence:\n - alias: Flag lights as running\n service: homeassistant.turn_on\n target:\n entity_id: input_boolean.holiday_lights_running\n - alias: Toggle light\n service: homeassistant.toggle\n data_template:\n entity_id: '{{states(''input_text.holiday_lights_next_to_switch'')}}'\n - alias: Set next light to change\n service: input_text.set_value\n data_template:\n entity_id: input_text.holiday_lights_next_to_switch\n value: '{{ state_attr(''group.holiday_lights'',''entity_id'') | random }}'\n - alias: Delay to wait for light group state\n delay: 00:00:05\n until:\n - alias: Check if there is at least one light on\n condition: state\n entity_id: group.holiday_lights\n state: 'on'\n - alias: Set next light change time\n service: input_datetime.set_datetime\n data_template:\n entity_id: input_datetime.holiday_lights_next_change\n time: '{{ (now() + timedelta(minutes=(range(15,45) | random | int))).strftime(''%H:%M:00'')\n }}'",
"config": [
{
"name": "family group",
"room": null,
"type": "group",
"id": {
"entity_id": "group.family",
"device_id": null
}
},
{
"name": "holiday lights bedtime",
"room": null,
"type": "input_datetime",
"id": {
"entity_id": "input_datetime.holiday_lights_bedtime",
"device_id": null
}
},
{
"name": "holiday lights starttime",
"room": null,
"type": "input_datetime",
"id": {
"entity_id": "input_datetime.holiday_lights_starttime",
"device_id": null
}
},
{
"name": "holiday lights next change",
"room": null,
"type": "input_datetime",
"id": {
"entity_id": "input_datetime.holiday_lights_next_change",
"device_id": null
}
},
{
"name": "holiday lights running",
"room": null,
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.holiday_lights_running",
"device_id": null
}
},
{
"name": "holiday lights next to switch",
"room": null,
"type": "input_text",
"id": {
"entity_id": "input_text.holiday_lights_next_to_switch",
"device_id": null
}
},
{
"name": "holiday lights group",
"room": null,
"type": "group",
"id": {
"entity_id": "group.holiday_lights",
"device_id": null
}
}
]
},
{
"id": "holiday_lights_off_at_bedtime",
"automation": "- id: holiday_lights_off_at_bedtime\n alias: Random Holiday Lights Off At Bedtime\n trigger:\n - platform: time\n at: input_datetime.holiday_lights_bedtime\n condition:\n - condition: state\n entity_id: group.family\n state: not_home\n action:\n - delay: 00:{{ range(2,30) | random | int }}:00\n - service: homeassistant.turn_off\n entity_id: group.holiday_lights\n - alias: Flag lights as stopped\n service: homeassistant.turn_off\n target:\n entity_id: input_boolean.holiday_lights_running",
"config": [
{
"name": "family group",
"room": null,
"type": "group",
"id": {
"entity_id": "group.family",
"device_id": null
}
},
{
"name": "holiday lights bedtime",
"room": null,
"type": "input_datetime",
"id": {
"entity_id": "input_datetime.holiday_lights_bedtime",
"device_id": null
}
},
{
"name": "holiday lights running",
"room": null,
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.holiday_lights_running",
"device_id": null
}
},
{
"name": "holiday lights group",
"room": null,
"type": "group",
"id": {
"entity_id": "group.holiday_lights",
"device_id": null
}
}
]
},
{
"id": "holiday_lights_stop_when_home",
"automation": "- id: holiday_lights_stop_when_home\n alias: Random Holiday Lights Stop When Home\n trigger:\n - platform: state\n entity_id:\n - group.family\n to: home\n condition:\n - condition: state\n entity_id: input_boolean.holiday_lights_running\n state: 'on'\n action:\n - alias: Flag lights as stopped\n service: homeassistant.turn_off\n target:\n entity_id: input_boolean.holiday_lights_running",
"config": [
{
"name": "family group",
"room": null,
"type": "group",
"id": {
"entity_id": "group.family",
"device_id": null
}
},
{
"name": "holiday lights running",
"room": null,
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.holiday_lights_running",
"device_id": null
}
}
]
},
{
"id": "muriatic_tank_level_update",
"automation": "- id: muriatic_tank_level_update\n alias: Acid tank level update\n initial_state: true\n trigger:\n - platform: time_pattern\n minutes: 1\n condition: []\n action:\n - service: input_number.set_value\n data_template:\n entity_id: input_number.muriatic_tank\n value: ' {{ ( states(''input_number.muriatic_tank'')|float - ( states(''sensor.muriatic_on_last_hour'')|float\n * states(''input_number.muriatic_speed'')|int * 60 / 1000 ) ) | round(2) }} '",
"config": [
{
"name": "muriatic tank input",
"room": null,
"type": "input_number",
"id": {
"entity_id": "input_number.muriatic_tank",
"device_id": null
}
},
{
"name": "muriatic on last hour",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.muriatic_on_last_hour",
"device_id": null
}
},
{
"name": "muriatic speed input",
"room": null,
"type": "input_number",
"id": {
"entity_id": "input_number.muriatic_speed",
"device_id": null
}
}
]
},
{
"id": "muriatic_tank_low",
"automation": "- id: muriatic_tank_low\n alias: Acid tank low\n initial_state: true\n trigger:\n platform: template\n value_template: '{% if states(''input_number.notify_muriatic_tank'')|int> 0 and\n states(''sensor.muriatic_tank'')|float < states(''input_number.notify_muriatic_tank'')|float\n %}true{% endif %}'\n condition: []\n action:\n - data_template:\n message: '@{{now().strftime(''%H:%M'')}}[{{now().day}}/{{now().month}}]'\n title: Muriatic tank low ({{states('input_number.muriatic_tank')|float}} liters\n )!!!\n service: notify.admins",
"config": [
{
"name": "muriatic tank input",
"room": null,
"type": "input_number",
"id": {
"entity_id": "input_number.muriatic_tank",
"device_id": null
}
},
{
"name": "notify muriatic tank input",
"room": null,
"type": "input_number",
"id": {
"entity_id": "input_number.notify_muriatic_tank",
"device_id": null
}
},
{
"name": "muriatic tank sensor",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.muriatic_tank",
"device_id": null
}
},
{
"name": "admins notification",
"room": null,
"type": "notify",
"id": {
"entity_id": "notify.admins",
"device_id": null
}
}
]
},
{
"id": "muriatic_high",
"automation": "- id: muriatic_high\n alias: Acid injection too high cutoff & notification\n initial_state: true\n trigger:\n platform: template\n value_template: '{% if states(''input_number.notify_muriatic_high'')|float> 0\n and states(''sensor.muriatic_on_last_24h'')|float > (states(''input_number.notify_muriatic_high'')|float*100\n ) / (states(''input_number.muriatic_speed'')|float *6) %}true{% endif %}'\n condition: []\n action:\n - service: input_boolean.turn_on\n entity_id: input_boolean.lock_muriatic\n - service: notify.admins\n data_template:\n message: '{{now().strftime(''%H:%M'')}}[{{now().day}}/{{now().month}}]'\n title: Muriatic inject blocked ({{states('sensor.muriatic_injected_last_24h')}}\n injected > {{states('input_number.notify_muriatic_high')}} in 24 hours)!!!",
"config": [
{
"name": "muriatic speed input",
"room": null,
"type": "input_number",
"id": {
"entity_id": "input_number.muriatic_speed",
"device_id": null
}
},
{
"name": "admins notification",
"room": null,
"type": "notify",
"id": {
"entity_id": "notify.admins",
"device_id": null
}
},
{
"name": "notify muriatic high input",
"room": null,
"type": "input_number",
"id": {
"entity_id": "input_number.notify_muriatic_high",
"device_id": null
}
},
{
"name": "muriatic on last 24h",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.muriatic_on_last_24h",
"device_id": null
}
},
{
"name": "lock muriatic input",
"room": null,
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.lock_muriatic",
"device_id": null
}
},
{
"name": "muriatic injected last 24h",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.muriatic_injected_last_24h",
"device_id": null
}
}
]
},
{
"id": "muriatic_set",
"automation": "- id: muriatic_set\n alias: Calculate acid to inject today\n initial_state: true\n trigger:\n - platform: state\n entity_id:\n - sensor.ph_mean\n from: unavailable\n for: 00:15:00\n condition: []\n action:\n - service: input_number.set_value\n data_template:\n entity_id: input_number.muriatic_inject\n value: ' {{ ( states(''input_number.pool_capacity'')|float * ( 10 ** (8 - states(''input_number.ph_target'')|float\n ) - 10 ** (8 - states(''sensor.ph_mean'')|float ) ) * (126.19 / states(''input_number.muriatic_concentration'')|float\n ),0 )|max |round(0)|int }} '\n - service: automation.trigger\n target:\n entity_id: automation.run_acid_injection_pump\n data:\n skip_condition: false",
"config": [
{
"name": "ph mean sensor",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.ph_mean",
"device_id": null
}
},
{
"name": "pool capacity input",
"room": null,
"type": "input_number",
"id": {
"entity_id": "input_number.pool_capacity",
"device_id": null
}
},
{
"name": "ph target input",
"room": null,
"type": "input_number",
"id": {
"entity_id": "input_number.ph_target",
"device_id": null
}
},
{
"name": "muriatic concentration input",
"room": null,
"type": "input_number",
"id": {
"entity_id": "input_number.muriatic_concentration",
"device_id": null
}
},
{
"name": "muriatic inject input",
"room": null,
"type": "input_number",
"id": {
"entity_id": "input_number.muriatic_inject",
"device_id": null
}
},
{
"name": "run acid injection pump automation",
"room": null,
"type": "automation",
"id": {
"entity_id": "automation.run_acid_injection_pump",
"device_id": null
}
}
]
},
{
"id": "muriatic_inject",
"automation": "- id: muriatic_inject\n alias: Run acid injection pump\n initial_state: true\n trigger: []\n condition: []\n action:\n - condition: state\n entity_id: input_boolean.lock_muriatic\n state: 'off'\n - condition: numeric_state\n entity_id: input_number.muriatic_inject\n above: 5.0\n below: 2500.0\n - condition: state\n entity_id: binary_sensor.pool_pump_running\n state: 'on'\n - service: notify.admins\n data_template:\n message: '{{now().strftime(''%H:%M'')}}[{{now().day}}/{{now().month}}]'\n title: 'Muriatic injection: ({{states(''input_number.muriatic_inject'')}} ml)!!!'\n - alias: Start acid injection timer\n service: timer.start\n target:\n entity_id: timer.muriatic_injection\n data:\n duration: '{{ [0 , 60 * states(''input_number.muriatic_inject'')|float/ states(''input_number.muriatic_speed'')|float\n ]|max|int }}'\n - alias: Loop to repeatedly turn the pump on until enough time has elapsed\n repeat:\n while: \"{{ is_state('timer.muriatic_injection', 'active')\\n and is_state('binary_sensor.pool_pump_running',\\\n \\ 'on')\\n and is_state('input_boolean.lock_muriatic', 'off')\\n and not\\\n \\ is_state('switch.pool_acid_pump', 'unavailable') }}\"\n sequence:\n - service: switch.turn_on\n entity_id: switch.pool_acid_pump\n - delay: 5\n - choose:\n - conditions: '{{ not is_state(''switch.pool_acid_pump'', ''on'') }}'\n sequence:\n - service: notify.admins\n data_template:\n message: '{{now().strftime(''%H:%M'')}}[{{now().day}}/{{now().month}}]'\n title: Acid pump didn't turn on, aborting injection.\n - service: input_boolean.turn_on\n entity_id: input_boolean.lock_muriatic\n - wait_template: '{{ is_state(''switch.pool_acid_pump'', ''off'') }}'\n timeout: 60\n - choose:\n - conditions: '{{ not wait.completed }}'\n sequence:\n - service: notify.admins\n data_template:\n message: '{{now().strftime(''%H:%M'')}}[{{now().day}}/{{now().month}}]'\n title: Acid pump didn't turn off, aborting loop but PUMP MAY BE RUNNING!!!\n - service: switch.turn_off\n entity_id: switch.pool_acid_pump\n - service: input_boolean.turn_on\n entity_id: input_boolean.lock_muriatic\n - service: notify.admins\n data_template:\n message: '{{now().strftime(''%H:%M'')}}[{{now().day}}/{{now().month}}]'\n title: Muriatic injection end.",
"config": [
{
"name": "muriatic speed input",
"room": null,
"type": "input_number",
"id": {
"entity_id": "input_number.muriatic_speed",
"device_id": null
}
},
{
"name": "admins notification",
"room": null,
"type": "notify",
"id": {
"entity_id": "notify.admins",
"device_id": null
}
},
{
"name": "lock muriatic input",
"room": null,
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.lock_muriatic",
"device_id": null
}
},
{
"name": "muriatic inject input",
"room": null,
"type": "input_number",
"id": {
"entity_id": "input_number.muriatic_inject",
"device_id": null
}
},
{
"name": "pool pump running sensor",
"room": null,
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.pool_pump_running",
"device_id": null
}
},
{
"name": "muriatic injection timer",
"room": null,
"type": "timer",
"id": {
"entity_id": "timer.muriatic_injection",
"device_id": null
}
},
{
"name": "pool acid pump switch",
"room": null,
"type": "switch",
"id": {
"entity_id": "switch.pool_acid_pump",
"device_id": null
}
}
]
},
{
"id": "holiday_light_notifications",
"automation": "- id: holiday_light_notifications\n alias: Holiday light notifications\n trigger:\n - platform: state\n entity_id:\n - input_boolean.holiday_lights_running\n to: null\n action:\n - service: notify.admins\n data:\n message: Holiday lights {% if is_state('input_boolean.holiday_lights_running',\n 'on') %}started{% else %}stopped{% endif %}",
"config": [
{
"name": "holiday lights running",
"room": null,
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.holiday_lights_running",
"device_id": null
}
},
{
"name": "admins notification",
"room": null,
"type": "notify",
"id": {
"entity_id": "notify.admins",
"device_id": null
}
}
]
},
{
"id": "'1559149839000'",
"automation": "- alias: Pool settings factory started\n id: '1559149839000'\n initial_state: true\n trigger:\n platform: homeassistant\n event: start\n condition:\n condition: state\n entity_id: input_boolean.factory_started\n state: 'off'\n action:\n - service: input_boolean.turn_on\n data:\n entity_id: input_boolean.factory_started\n - service: input_number.set_value\n data_template:\n entity_id: input_number.pool_capacity\n value: 50\n - service: input_number.set_value\n data_template:\n entity_id: input_number.fc_target\n value: 1.5\n - service: input_number.set_value\n data_template:\n entity_id: input_number.e_fc_adjust\n value: 0\n - service: input_number.set_value\n data_template:\n entity_id: input_number.ph_target\n value: 7.2\n - service: input_number.set_value\n data_template:\n entity_id: input_number.muriatic_tank\n value: 10\n - service: input_number.set_value\n data_template:\n entity_id: input_number.muriatic_concentration\n value: 20\n - service: input_number.set_value\n data_template:\n entity_id: input_number.muriatic_speed\n value: 25",
"config": [
{
"name": "fc target input",
"room": null,
"type": "input_number",
"id": {
"entity_id": "input_number.fc_target",
"device_id": null
}
},
{
"name": "muriatic tank input",
"room": null,
"type": "input_number",
"id": {
"entity_id": "input_number.muriatic_tank",
"device_id": null
}
},
{
"name": "muriatic speed input",
"room": null,
"type": "input_number",
"id": {
"entity_id": "input_number.muriatic_speed",
"device_id": null
}
},
{
"name": "pool capacity input",
"room": null,
"type": "input_number",
"id": {
"entity_id": "input_number.pool_capacity",
"device_id": null
}
},
{
"name": "ph target input",
"room": null,
"type": "input_number",
"id": {
"entity_id": "input_number.ph_target",
"device_id": null
}
},
{
"name": "muriatic concentration input",
"room": null,
"type": "input_number",
"id": {
"entity_id": "input_number.muriatic_concentration",
"device_id": null
}
},
{
"name": "factory started input",
"room": null,
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.factory_started",
"device_id": null
}
},
{
"name": "fc adjust input",
"room": null,
"type": "input_number",
"id": {
"entity_id": "input_number.e_fc_adjust",
"device_id": null
}
}
]
},
{
"id": "visitors_passthrough",
"automation": "- id: visitors_passthrough\n alias: Apply visitor person state based on button\n trigger:\n - platform: state\n entity_id:\n - input_boolean.visitors_at_home\n - platform: homeassistant\n event: start\n action:\n - service: device_tracker.see\n data:\n dev_id: visitors\n location_name: \"{% if is_state('input_boolean.visitors_at_home', 'on') -%}\\n\\\n \\ home\\n{%- else -%}\\n not_home\\n{%- endif %}\"",
"config": [
{
"name": "visitors at home input",
"room": null,
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.visitors_at_home",
"device_id": null
}
}
]
}
]