[ { "id": "androidtv_adb_ok_button", "automation": "- id: androidtv_adb_ok_button\n alias: AndroidTV ADB Ok Button\n description: ''\n triggers:\n - trigger: webhook\n allowed_methods:\n - PUT\n local_only: true\n webhook_id: androidtv-ok\n conditions: []\n actions:\n - action: androidtv.adb_command\n metadata: {}\n data:\n command: input keyevent 23\n target:\n entity_id: media_player.ldk_android_tv\n mode: single", "config": [ { "name": "LDK Android TV", "room": "living_room", "type": "media_player", "id": { "entity_id": "media_player.ldk_android_tv", "device_id": null } } ] }, { "id": "androidtv_adb_show_inputs", "automation": "- id: androidtv_adb_show_inputs\n alias: AndroidTV ADB Show Inputs\n description: ''\n triggers:\n - trigger: webhook\n allowed_methods:\n - PUT\n local_only: true\n webhook_id: androidtv-inputs\n conditions: []\n actions:\n - action: androidtv.adb_command\n metadata: {}\n data:\n command: am start -a com.android.tv.action.VIEW_INPUTS -n com.google.android.tvlauncher/.inputs.InputsPanelActivity\n -f 0x10000000\n target:\n entity_id: media_player.ldk_android_tv\n mode: single", "config": [ { "name": "LDK Android TV", "room": "living_room", "type": "media_player", "id": { "entity_id": "media_player.ldk_android_tv", "device_id": null } } ] }, { "id": "climate", "automation": "- id: climate\n alias: Climate\n description: ''\n triggers:\n - trigger: calendar\n entity_id: calendar.climate\n event: start\n conditions:\n - condition: state\n entity_id: input_boolean.vacation_mode\n state: 'off'\n actions:\n - variables:\n duration: \"{% set start = trigger.calendar_event.start | as_datetime %} {% set\\\n \\ next_midnight = (start + timedelta(days=1)).replace(hour=0, minute=0, second=0,\\\n \\ microsecond=0) %} {% set end = trigger.calendar_event.end | as_datetime\\\n \\ %}\\n\\n{% if end == next_midnight %}\\n {{ None }}\\n{% else %}\\n {{ end\\\n \\ - start }}\\n{% endif %}\\n\"\n summary: '{{ trigger.calendar_event.summary.split(\" \") }}\n\n '\n entities: \"{% set room = summary[0] | lower %}\\n{{ \\n { \\n \\\"climate\\\":\\\n \\ \\\"climate.{}_ac\\\".format(room),\\n \\\"temperature\\\": \\\"sensor.{}_temperature_avg\\\"\\\n .format(room)\\n } \\n}}\\n\"\n mode: '{{ summary[1] | lower }}\n\n '\n temp: \"{% if mode == \\\"heat\\\" %}\\n {{ \\n {\\n \\\"target\\\": 24,\\n \\\n \\ \\\"cmp\\\": \\\"lte\\\",\\n \\\"cmp_target\\\": 20\\n } \\n }}\\n{% elif mode\\\n \\ == \\\"cool\\\" %}\\n {{ \\n {\\n \\\"target\\\": 27,\\n \\\"cmp\\\": \\\"gte\\\"\\\n ,\\n \\\"cmp_target\\\": 26\\n } \\n }}\\n{% endif %}\\n\"\n - alias: If temperature condition matches\n if:\n - condition: template\n value_template: \"{% if temp.cmp == \\\"lte\\\" %}\\n {{ float(states(entities.temperature))\\\n \\ <= temp.cmp_target }}\\n{% elif temp.cmp == \\\"gte\\\" %}\\n {{ float(states(entities.temperature))\\\n \\ >= temp.cmp_target }}\\n{% endif %}\"\n then:\n - action: climate.set_temperature\n metadata: {}\n data:\n hvac_mode: '{{ mode }}'\n temperature: '{{ temp.target }}'\n target:\n entity_id: '{{ entities.climate }}'\n alias: Enable climate\n - alias: Maybe wait to turn off\n if:\n - condition: template\n value_template: '{{ duration != None }}'\n alias: If duration is not empty\n then:\n - alias: Wait for climate to turn off\n wait_template: '{{ is_state(entities.climate, \"off\") }}\n\n '\n timeout: '{{ duration }}'\n continue_on_timeout: true\n - alias: Turn off if timed out\n if:\n - condition: template\n value_template: '{{ not wait.completed }}'\n alias: If timed out\n then:\n - action: climate.turn_off\n metadata: {}\n data: {}\n target:\n entity_id: '{{ entities.climate }}'\n mode: parallel\n max: 10", "config": [ { "name": "vacation mode", "room": null, "type": "input_boolean", "id": { "entity_id": "input_boolean.vacation_mode", "device_id": null } }, { "name": "climate calendar", "room": null, "type": "calendar", "id": { "entity_id": "calendar.climate", "device_id": null } } ] }, { "id": "hallway_wardrobe_light", "automation": "- id: hallway_wardrobe_light\n alias: Hallway Wardrobe Light\n description: ''\n triggers:\n - trigger: state\n entity_id: binary_sensor.hallway_wardrobe_door_sensor_1_contact\n to: 'on'\n - trigger: state\n entity_id: binary_sensor.hallway_wardrobe_door_sensor_1_contact\n to: 'off'\n conditions: []\n actions:\n - choose:\n - conditions:\n - condition: template\n value_template: '{{ trigger.to_state.state == \"on\" }}\n\n '\n - condition: state\n entity_id: light.hallway_wardrobe_led_controller_1\n state: 'off'\n sequence:\n - action: light.turn_on\n metadata: {}\n data:\n brightness_pct: 100\n target:\n entity_id: light.hallway_wardrobe_led_controller_1\n - alias: Wait for door to close or timeout\n wait_for_trigger:\n - trigger: state\n entity_id: binary_sensor.hallway_wardrobe_door_sensor_1_contact\n to: 'off'\n timeout:\n hours: 0\n minutes: 10\n seconds: 0\n milliseconds: 0\n continue_on_timeout: true\n - if:\n - condition: state\n entity_id: light.hallway_wardrobe_led_controller_1\n state: 'on'\n - condition: state\n entity_id: binary_sensor.hallway_wardrobe_door_sensor_1_contact\n state: 'on'\n then:\n - action: light.turn_on\n metadata: {}\n data:\n brightness_pct: 30\n target:\n entity_id: light.hallway_wardrobe_led_controller_1\n alias: Drop brightness\n alias: If door is still open and the light is on\n alias: If door is open\n - conditions:\n - condition: template\n value_template: '{{ trigger.to_state.state == \"off\" }}\n\n '\n - condition: state\n entity_id: light.hallway_wardrobe_led_controller_1\n state: 'on'\n sequence:\n - action: light.turn_off\n metadata: {}\n data: {}\n target:\n entity_id: light.hallway_wardrobe_led_controller_1\n alias: If door is closed\n mode: parallel\n max: 5", "config": [ { "name": "hallway wardrobe door sensor 1", "room": "hallway", "type": "binary_sensor", "id": { "entity_id": "binary_sensor.hallway_wardrobe_door_sensor_1_contact", "device_id": null } }, { "name": "hallway wardrobe LED controller 1", "room": "hallway", "type": "light", "id": { "entity_id": "light.hallway_wardrobe_led_controller_1", "device_id": null } } ] }, { "id": "humidifier_no_water", "automation": "- id: humidifier_no_water\n alias: Humidifier No water\n description: ''\n triggers:\n - trigger: numeric_state\n entity_id:\n - sensor.ldk_humidifier_water_level\n below: 25\n conditions: []\n actions:\n - action: notify.notify\n metadata: {}\n data:\n message: No water in Humidifier\n mode: single", "config": [ { "name": "LDK humidifier water level", "room": "living_room", "type": "sensor", "id": { "entity_id": "sensor.ldk_humidifier_water_level", "device_id": null } } ] }, { "id": "humidifier_morning", "automation": "- id: humidifier_morning\n alias: Humidifier Morning\n description: ''\n triggers:\n - trigger: time\n at: 07:00:00\n conditions:\n - condition: state\n entity_id: input_boolean.vacation_mode\n state: 'off'\n - condition: not\n conditions:\n - condition: state\n entity_id: light.ldk_humidifier_status\n state: unavailable\n alias: Humidifier is online\n - condition: numeric_state\n entity_id: sensor.ldk_humidity_avg\n below: 45\n actions:\n - action: select.select_option\n metadata: {}\n data:\n option: Auto\n target:\n entity_id: select.ldk_humidifier_operating_mode_select\n mode: single", "config": [ { "name": "vacation mode", "room": null, "type": "input_boolean", "id": { "entity_id": "input_boolean.vacation_mode", "device_id": null } }, { "name": "LDK humidifier status", "room": "living_room", "type": "light", "id": { "entity_id": "light.ldk_humidifier_status", "device_id": null } }, { "name": "LDK humidity average", "room": "living_room", "type": "sensor", "id": { "entity_id": "sensor.ldk_humidity_avg", "device_id": null } }, { "name": "LDK humidifier operating mode select", "room": "living_room", "type": "select", "id": { "entity_id": "select.ldk_humidifier_operating_mode_select", "device_id": null } } ] } ]