AutomationDataset/marcocunha/description-ready.json

1468 lines
85 KiB
JSON

[
{
"id": "clear_active_mode",
"automation": "- id: clear_active_mode\n alias: Clear Active Mode\n mode: single\n description: Clears Active Mode Input Helper\n trigger:\n - platform: time\n at: 07:00:00\n condition: []\n action:\n - service: input_text.set_value\n metadata: {}\n data:\n value: ''\n target:\n entity_id: input_text.active_mode",
"config": [
{
"name": "active mode",
"room": null,
"type": "input_text",
"id": {
"entity_id": "input_text.active_mode",
"device_id": null
}
}
]
},
{
"id": "clear_force_hot_water_helpers",
"automation": "- id: clear_force_hot_water_helpers\n alias: Clear Force Hot Water Helpers\n mode: single\n description: Clears Force Hot Water Helpers\n trigger:\n - platform: time\n at:\n - 00:00:00\n - '10:00:00'\n - '20:00:00'\n condition: []\n action:\n - action: input_boolean.turn_off\n data: {}\n target:\n entity_id: input_boolean.force_hot_water_off\n - action: input_boolean.turn_off\n data: {}\n target:\n entity_id: input_boolean.force_hot_water_on",
"config": [
{
"name": "force hot water off",
"room": null,
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.force_hot_water_off",
"device_id": null
}
},
{
"name": "force hot water on",
"room": null,
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.force_hot_water_on",
"device_id": null
}
}
]
},
{
"id": "control_hot_water_schedule",
"automation": "- id: control_hot_water_schedule\n alias: Control hot water based on schedule and solar energy production\n description: Control hot water based on schedule and solar energy production\n mode: single\n trigger:\n - platform: state\n entity_id:\n - schedule.hotwater_schedule\n - platform: state\n entity_id:\n - input_boolean.force_hot_water_off\n - platform: state\n entity_id:\n - input_boolean.force_hot_water_on\n - platform: time_pattern\n minutes: /15\n condition: []\n action:\n - choose:\n - conditions:\n - condition: state\n alias: Force the hot water to be switched off\n entity_id: input_boolean.force_hot_water_off\n state: 'on'\n sequence:\n - service: switch.turn_off\n data: {}\n target:\n entity_id: switch.hot_water\n - conditions:\n - condition: state\n alias: Force the hot water to be switched on\n entity_id: input_boolean.force_hot_water_on\n state: 'on'\n sequence:\n - service: switch.turn_on\n data: {}\n target:\n entity_id: switch.hot_water\n - conditions:\n - condition: or\n alias: Hot water schedule is ON or we have energy excess.\n conditions:\n - condition: state\n entity_id: schedule.hotwater_schedule\n state: 'on'\n alias: Hot Water schedule is ON\n - condition: template\n value_template: '{{ states(''sensor.energy_consumption_mean_over_last_10_minutes'')|float\n < -2000 }}'\n alias: We have energy excess\n - condition: template\n value_template: \"{{ states('sensor.resistencia_termoacumulador_temperature')\\\n \\ <\\n states('input_number.desired_hot_water_temperature') }}\"\n alias: Current temperature lower than desired temperature\n sequence:\n - service: switch.turn_on\n data: {}\n target:\n entity_id: switch.hot_water\n - conditions:\n - condition: or\n alias: Hot water schedule is OFF or has reached the desired temperature\n conditions:\n - condition: state\n entity_id: schedule.hotwater_schedule\n state: 'off'\n alias: Hot Water schedule is OFF\n - condition: template\n value_template: \"{{ states('sensor.resistencia_termoacumulador_temperature')\\\n \\ >=\\n states('input_number.desired_hot_water_temperature') }}\"\n alias: Actual temperature higher than desired temperature\n sequence:\n - service: switch.turn_off\n data: {}\n target:\n entity_id: switch.hot_water",
"config": [
{
"name": "force hot water off",
"room": null,
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.force_hot_water_off",
"device_id": null
}
},
{
"name": "force hot water on",
"room": null,
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.force_hot_water_on",
"device_id": null
}
},
{
"name": "hot water schedule",
"room": null,
"type": "schedule",
"id": {
"entity_id": "schedule.hotwater_schedule",
"device_id": null
}
},
{
"name": "hot water",
"room": null,
"type": "switch",
"id": {
"entity_id": "switch.hot_water",
"device_id": null
}
},
{
"name": "energy consumption mean over last 10 minutes",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.energy_consumption_mean_over_last_10_minutes",
"device_id": null
}
},
{
"name": "resistencia termoacumulador temperature",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.resistencia_termoacumulador_temperature",
"device_id": null
}
},
{
"name": "desired hot water temperature",
"room": null,
"type": "input_number",
"id": {
"entity_id": "input_number.desired_hot_water_temperature",
"device_id": null
}
}
]
},
{
"id": "control_swimming_pool_pump_based_schedule",
"automation": "- id: control_swimming_pool_pump_based_schedule\n alias: Control swimming pool pump based on schedule\n description: Control swimming pool pump based on schedule\n mode: single\n trigger:\n - platform: state\n entity_id:\n - schedule.swimming_pool_pump_schedule\n condition: []\n action:\n - choose:\n - conditions:\n - condition: state\n entity_id: schedule.swimming_pool_pump_schedule\n state: 'on'\n alias: Swimming pool pump schedule is ON\n sequence:\n - alias: Turn on pump\n service: switch.turn_on\n target:\n device_id: 11352414f861aaceba25adee16b975f5\n - conditions:\n - condition: state\n entity_id: schedule.swimming_pool_pump_schedule\n state: 'off'\n alias: Swimming pool pump schedule is OFF\n sequence:\n - alias: Turn off pump\n service: switch.turn_off\n target:\n device_id: 11352414f861aaceba25adee16b975f5",
"config": [
{
"name": "swimming pool pump schedule",
"room": null,
"type": "schedule",
"id": {
"entity_id": "schedule.swimming_pool_pump_schedule",
"device_id": null
}
},
{
"name": "swimming pool pump",
"room": "swimming_pool",
"type": "switch",
"id": {
"entity_id": null,
"device_id": "11352414f861aaceba25adee16b975f5"
}
}
]
},
{
"id": "delete_cameras_snapshots",
"automation": "- id: delete_cameras_snapshots\n alias: Delete snapshot cameras\n trigger:\n - platform: homeassistant\n event: start\n - platform: time_pattern\n hours: '7'\n minutes: '0'\n seconds: '0'\n action:\n - service: delete.files_in_folder\n data:\n folder: /config/www/doorbell/\n time: 604800\n only_extensions:\n - .png\n - .jpg",
"config": []
},
{
"id": "fetch_periodically_alarm_status",
"automation": "- id: fetch_periodically_alarm_status\n alias: Fetch periodically alarm status\n mode: single\n max_exceeded: silent\n trigger:\n - platform: homeassistant\n event: start\n - platform: time_pattern\n minutes: /10\n condition:\n - condition: or\n alias: TV is off or macmini is not visible\n conditions:\n - condition: state\n entity_id: media_player.lg_webos_tv_oled48c16la\n state: 'off'\n - condition: not\n conditions:\n - condition: state\n entity_id: media_player.lg_webos_tv_oled48c16la\n attribute: source\n state: HDMI 3\n alias: Mac mini is visible, probably being used\n action:\n - service: rest_command.trigger_alarm_status_check\n data: {}",
"config": [
{
"name": "lg webos tv oled48c16la",
"room": "living_room",
"type": "media_player",
"id": {
"entity_id": "media_player.lg_webos_tv_oled48c16la",
"device_id": null
}
}
]
},
{
"id": "frigate_motion_detected",
"automation": "- id: frigate_motion_detected\n alias: Frigate Motion detected\n mode: single\n max_exceeded: silent\n trigger:\n platform: mqtt\n topic: frigate/events\n condition:\n - condition: or\n conditions:\n - condition: state\n entity_id: input_boolean.anyone_home\n state: 'off'\n - condition: state\n entity_id: alarm_control_panel.ajax_security_system\n state: armed_home\n action:\n - service: notify.ha_mobile_apps\n data_template:\n message: A {{trigger.payload_json[\"after\"][\"label\"]}} was detected.\n data:\n image: http://192.168.1.146:5000/api/events/{{trigger.payload_json[\"after\"][\"id\"]}}/thumbnail.jpg?format=android\n tag: '{{trigger.payload_json[\"after\"][\"id\"]}}'\n when: '{{trigger.payload_json[\"after\"][\"start_time\"]|int}}'\n ttl: 0\n priority: high",
"config": [
{
"name": "anyone home",
"room": null,
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.anyone_home",
"device_id": null
}
},
{
"name": "ajax security system",
"room": null,
"type": "alarm_control_panel",
"id": {
"entity_id": "alarm_control_panel.ajax_security_system",
"device_id": null
}
}
]
},
{
"id": "motion_detected_back",
"automation": "- id: motion_detected_back\n alias: Motion detected - Back\n mode: single\n max_exceeded: silent\n variables:\n notify_device: notify.ha_mobile_apps\n trigger_entity: binary_sensor.dvr_camera_traseiras_motion_alarm_2\n doorbell_cam: camera.dvr_camera_traseiras_main_2\n notification_title: Movimento Detectado - Traseiras\n persistent_notification: false\n image_file: /local/doorbell/{{ expand(trigger_entity)[0].last_changed | as_timestamp |\n timestamp_custom(\"%Y-%m-%d_%H-%M-%S-%f\") }}.jpg\n llm_model: gemini-1.5-pro\n llm_prompt: Atua como sendo o responsável pelo meu sistema de segurança em casa.\n Descreve a imagem numa frase curta usando Português de Portugal. Se vires pessoas,\n descreve-as.\n trigger:\n platform: state\n entity_id:\n - binary_sensor.dvr_camera_traseiras_motion_alarm_2\n from: 'off'\n to: 'on'\n for: 00:00:02\n condition:\n - condition: or\n conditions:\n - condition: state\n entity_id: input_boolean.anyone_home\n state: 'off'\n - condition: state\n entity_id: alarm_control_panel.ajax_security_system\n state: armed_home\n action:\n - action: camera.snapshot\n data:\n filename: /config/www/doorbell/{{ expand(trigger_entity)[0].last_changed | as_timestamp |\n timestamp_custom(\"%Y-%m-%d_%H-%M-%S-%f\") }}.jpg\n target:\n entity_id: '{{doorbell_cam}}'\n - action: llmvision.image_analyzer\n data:\n remember: false\n include_filename: false\n target_width: 1280\n max_tokens: 100\n temperature: 0.2\n expose_images: false\n image_file: /config/www/doorbell/{{ expand(trigger_entity)[0].last_changed |\n as_timestamp | timestamp_custom(\"%Y-%m-%d_%H-%M-%S-%f\") }}.jpg\n provider: 01JFTMMBPD3Y5F42RRWGGZ8W73\n message: '{{llm_prompt}}'\n model: '{{ llm_model }}'\n response_variable: llm_response\n - service: notify.ha_mobile_apps\n data:\n title: '{{ notification_title }}'\n message: '{{llm_response.response_text}}'\n data:\n tag: '{{ notification_title }}'\n persistent: '{{ persistent_notification }}'\n image: '{{ image_file }}'\n ttl: 0\n priority: high\n actions:\n - action: URI\n title: Open Camera\n uri: app://com.mm.android.DMSS\n - delay:\n minutes: 3",
"config": [
{
"name": "anyone home",
"room": null,
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.anyone_home",
"device_id": null
}
},
{
"name": "ajax security system",
"room": null,
"type": "alarm_control_panel",
"id": {
"entity_id": "alarm_control_panel.ajax_security_system",
"device_id": null
}
},
{
"name": "dvr camera traseiras motion alarm 2",
"room": "back",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.dvr_camera_traseiras_motion_alarm_2",
"device_id": null
}
},
{
"name": "dvr camera traseiras main 2",
"room": "back",
"type": "camera",
"id": {
"entity_id": "camera.dvr_camera_traseiras_main_2",
"device_id": null
}
}
]
},
{
"id": "motion_detected_frente",
"automation": "- id: motion_detected_frente\n alias: Motion detected - Frente\n mode: single\n max_exceeded: silent\n variables:\n notify_device: notify.ha_mobile_apps\n trigger_entity: binary_sensor.dvr_camera_frente_motion_alarm\n doorbell_cam: camera.dvr_camera_frente_main\n notification_title: Movimento Detectado na Frente\n persistent_notification: false\n image_file: /local/doorbell/{{ expand(trigger_entity)[0].last_changed | as_timestamp |\n timestamp_custom(\"%Y-%m-%d_%H-%M-%S-%f\") }}.jpg\n llm_model: gemini-1.5-pro\n llm_prompt: Atua como sendo o responsável pelo meu sistema de segurança em casa.\n Descreve a imagem numa frase curta usando Português de Portugal. Se vires pessoas,\n descreve-as.\n trigger:\n platform: state\n entity_id:\n - binary_sensor.dvr_camera_frente_motion_alarm\n from: 'off'\n to: 'on'\n for: 00:00:02\n condition:\n - condition: or\n conditions:\n - condition: state\n entity_id: input_boolean.anyone_home\n state: 'off'\n - condition: state\n entity_id: alarm_control_panel.ajax_security_system\n state: armed_home\n action:\n - action: camera.snapshot\n data:\n filename: /config/www/doorbell/{{ expand(trigger_entity)[0].last_changed | as_timestamp |\n timestamp_custom(\"%Y-%m-%d_%H-%M-%S-%f\") }}.jpg\n target:\n entity_id: '{{doorbell_cam}}'\n - action: llmvision.image_analyzer\n data:\n remember: false\n include_filename: false\n target_width: 1280\n max_tokens: 100\n temperature: 0.2\n expose_images: false\n image_file: /config/www/doorbell/{{ expand(trigger_entity)[0].last_changed |\n as_timestamp | timestamp_custom(\"%Y-%m-%d_%H-%M-%S-%f\") }}.jpg\n provider: 01JFTMMBPD3Y5F42RRWGGZ8W73\n message: '{{llm_prompt}}'\n model: '{{ llm_model }}'\n response_variable: llm_response\n - service: notify.ha_mobile_apps\n data:\n title: '{{ notification_title }}'\n message: '{{llm_response.response_text}}'\n data:\n tag: '{{ notification_title }}'\n persistent: '{{ persistent_notification }}'\n image: '{{ image_file }}'\n ttl: 0\n priority: high\n actions:\n - action: URI\n title: Open Camera\n uri: app://com.mm.android.DMSS\n - delay:\n minutes: 3",
"config": [
{
"name": "anyone home",
"room": null,
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.anyone_home",
"device_id": null
}
},
{
"name": "ajax security system",
"room": null,
"type": "alarm_control_panel",
"id": {
"entity_id": "alarm_control_panel.ajax_security_system",
"device_id": null
}
},
{
"name": "dvr camera frente motion alarm",
"room": "front",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.dvr_camera_frente_motion_alarm",
"device_id": null
}
},
{
"name": "dvr camera frente main",
"room": "front",
"type": "camera",
"id": {
"entity_id": "camera.dvr_camera_frente_main",
"device_id": null
}
}
]
},
{
"id": "motion_detected_garage",
"automation": "- id: motion_detected_garage\n alias: Motion detected - Garage\n mode: single\n max_exceeded: silent\n variables:\n notify_device: notify.ha_mobile_apps\n trigger_entity: binary_sensor.dvr_camera_garagem_motion_alarm_2\n doorbell_cam: camera.dvr_camera_garagem_sub_4\n notification_title: Movimento Detectado na Garagem\n persistent_notification: false\n image_file: /local/doorbell/{{ expand(trigger_entity)[0].last_changed | as_timestamp |\n timestamp_custom(\"%Y-%m-%d_%H-%M-%S-%f\") }}.jpg\n llm_model: gemini-1.5-pro\n llm_prompt: Atua como sendo o responsável pelo meu sistema de segurança em casa.\n Descreve a imagem numa frase curta usando Português de Portugal. Se vires pessoas,\n descreve-as.\n trigger:\n platform: state\n entity_id:\n - binary_sensor.dvr_camera_garagem_motion_alarm_2\n from: 'off'\n to: 'on'\n for: 00:00:02\n condition:\n - condition: or\n conditions:\n - condition: state\n entity_id: input_boolean.anyone_home\n state: 'off'\n - condition: state\n entity_id: alarm_control_panel.ajax_security_system\n state: armed_home\n action:\n - action: camera.snapshot\n data:\n filename: /config/www/doorbell/{{ expand(trigger_entity)[0].last_changed | as_timestamp |\n timestamp_custom(\"%Y-%m-%d_%H-%M-%S-%f\") }}.jpg\n target:\n entity_id: '{{doorbell_cam}}'\n - action: llmvision.image_analyzer\n data:\n remember: false\n include_filename: false\n target_width: 1280\n max_tokens: 100\n temperature: 0.2\n expose_images: false\n image_file: /config/www/doorbell/{{ expand(trigger_entity)[0].last_changed |\n as_timestamp | timestamp_custom(\"%Y-%m-%d_%H-%M-%S-%f\") }}.jpg\n provider: 01JFTMMBPD3Y5F42RRWGGZ8W73\n message: '{{llm_prompt}}'\n model: '{{ llm_model }}'\n response_variable: llm_response\n - service: notify.ha_mobile_apps\n data:\n title: '{{ notification_title }}'\n message: '{{llm_response.response_text}}'\n data:\n tag: '{{ notification_title }}'\n persistent: '{{ persistent_notification }}'\n image: '{{ image_file }}'\n ttl: 0\n priority: high\n actions:\n - action: URI\n title: Open Camera\n uri: app://com.mm.android.DMSS\n - delay:\n minutes: 3",
"config": [
{
"name": "anyone home",
"room": null,
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.anyone_home",
"device_id": null
}
},
{
"name": "ajax security system",
"room": null,
"type": "alarm_control_panel",
"id": {
"entity_id": "alarm_control_panel.ajax_security_system",
"device_id": null
}
},
{
"name": "dvr camera garagem motion alarm 2",
"room": "garage",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.dvr_camera_garagem_motion_alarm_2",
"device_id": null
}
},
{
"name": "dvr camera garagem sub 4",
"room": "garage",
"type": "camera",
"id": {
"entity_id": "camera.dvr_camera_garagem_sub_4",
"device_id": null
}
}
]
},
{
"id": "motion_detected_swimming_pool",
"automation": "- id: motion_detected_swimming_pool\n alias: Motion detected - Swimming pool\n mode: single\n max_exceeded: silent\n variables:\n notify_device: notify.ha_mobile_apps\n trigger_entity: binary_sensor.dvr_camera_piscina_motion_alarm_2\n doorbell_cam: camera.dvr_camera_piscina_main_2\n notification_title: Movimento Detectado na Piscina\n persistent_notification: false\n image_file: /local/doorbell/{{ expand(trigger_entity)[0].last_changed | as_timestamp |\n timestamp_custom(\"%Y-%m-%d_%H-%M-%S-%f\") }}.jpg\n llm_model: gemini-1.5-pro\n llm_prompt: Atua como sendo o responsável pelo meu sistema de segurança em casa.\n Descreve a imagem numa frase curta usando Português de Portugal. Se vires pessoas,\n descreve-as.\n trigger:\n platform: state\n entity_id:\n - binary_sensor.dvr_camera_piscina_motion_alarm_2\n from: 'off'\n to: 'on'\n for: 00:00:02\n condition:\n - condition: or\n conditions:\n - condition: state\n entity_id: input_boolean.anyone_home\n state: 'off'\n - condition: state\n entity_id: alarm_control_panel.ajax_security_system\n state: armed_home\n action:\n - action: camera.snapshot\n data:\n filename: /config/www/doorbell/{{ expand(trigger_entity)[0].last_changed | as_timestamp |\n timestamp_custom(\"%Y-%m-%d_%H-%M-%S-%f\") }}.jpg\n target:\n entity_id: '{{doorbell_cam}}'\n - action: llmvision.image_analyzer\n data:\n remember: false\n include_filename: false\n target_width: 1280\n max_tokens: 100\n temperature: 0.2\n expose_images: false\n image_file: /config/www/doorbell/{{ expand(trigger_entity)[0].last_changed |\n as_timestamp | timestamp_custom(\"%Y-%m-%d_%H-%M-%S-%f\") }}.jpg\n provider: 01JFTMMBPD3Y5F42RRWGGZ8W73\n message: '{{llm_prompt}}'\n model: '{{ llm_model }}'\n response_variable: llm_response\n - service: notify.ha_mobile_apps\n data:\n title: '{{ notification_title }}'\n message: '{{llm_response.response_text}}'\n data:\n tag: '{{ notification_title }}'\n persistent: '{{ persistent_notification }}'\n image: '{{ image_file }}'\n ttl: 0\n priority: high\n actions:\n - action: URI\n title: Open Camera\n uri: app://com.mm.android.DMSS\n - delay:\n minutes: 3",
"config": [
{
"name": "anyone home",
"room": null,
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.anyone_home",
"device_id": null
}
},
{
"name": "ajax security system",
"room": null,
"type": "alarm_control_panel",
"id": {
"entity_id": "alarm_control_panel.ajax_security_system",
"device_id": null
}
},
{
"name": "dvr camera piscina motion alarm 2",
"room": "swimming_pool",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.dvr_camera_piscina_motion_alarm_2",
"device_id": null
}
},
{
"name": "dvr camera piscina main 2",
"room": "swimming_pool",
"type": "camera",
"id": {
"entity_id": "camera.dvr_camera_piscina_main_2",
"device_id": null
}
}
]
},
{
"id": "motion_detected_tablet",
"automation": "- id: motion_detected_tablet\n alias: Motion detected - Tablet\n mode: single\n max_exceeded: silent\n variables:\n notify_device: notify.ha_mobile_apps\n trigger_entity: binary_sensor.wallpanel_samsung_tab_s_10_5_motion_detected\n doorbell_cam: camera.wallpanel_samsung\n notification_title: Movimento Detectado\n notification_message: Tablet\n persistent_notification: false\n image_file: /local/doorbell/{{ expand(trigger_entity)[0].last_changed | as_timestamp |\n timestamp_custom(\"%Y-%m-%d_%H-%M-%S-%f\") }}.jpg\n trigger:\n platform: state\n entity_id:\n - binary_sensor.wallpanel_samsung_tab_s_10_5_motion_detected\n to: 'on'\n for: 00:00:02\n condition:\n - condition: or\n conditions:\n - condition: state\n entity_id: input_boolean.anyone_home\n state: 'off'\n - condition: state\n entity_id: alarm_control_panel.ajax_security_system\n state: armed_home\n action:\n - data_template:\n entity_id: camera.wallpanel_samsung\n filename: /config/www/doorbell/{{ expand(trigger_entity)[0].last_changed | as_timestamp |\n timestamp_custom(\"%Y-%m-%d_%H-%M-%S-%f\") }}.jpg\n service: camera.snapshot\n - service: notify.ha_mobile_apps\n data:\n title: '{{ notification_title }}'\n message: '{{ notification_message }}'\n data:\n tag: '{{ notification_title }}'\n persistent: '{{ persistent_notification }}'\n image: '{{ image_file }}'\n ttl: 0\n priority: high\n - delay:\n minutes: 3",
"config": [
{
"name": "anyone home",
"room": null,
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.anyone_home",
"device_id": null
}
},
{
"name": "ajax security system",
"room": null,
"type": "alarm_control_panel",
"id": {
"entity_id": "alarm_control_panel.ajax_security_system",
"device_id": null
}
},
{
"name": "wallpanel samsung tab s 10 5 motion detected",
"room": null,
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.wallpanel_samsung_tab_s_10_5_motion_detected",
"device_id": null
}
},
{
"name": "wallpanel samsung",
"room": null,
"type": "camera",
"id": {
"entity_id": "camera.wallpanel_samsung",
"device_id": null
}
}
]
},
{
"id": "notify_swimming_pool_daily_working_hours",
"automation": "- id: notify_swimming_pool_daily_working_hours\n alias: Swimming pool daily working hours\n description: Send a message about the daily operation time of the swimming pool\n pump\n variables:\n send_notification: true\n notify_device: notify.ha_mobile_apps\n notification_title: Bomba da Piscina\n persistent_notification: false\n trigger:\n - platform: time_pattern\n hours: '21'\n minutes: '30'\n seconds: '0'\n action:\n - alias: Inform swimming pool pump was turned off due to time usage\n service: notify.ha_mobile_apps\n data:\n title: '{{ notification_title }}'\n message: '{{ ''A bomba hoje trabalhou: '' ~ states(''sensor.swimming_pool_pump_on_today'')|float ~\n ''h.''}}'\n data:\n tag: '{{ notification_title }}'\n persistent: '{{ persistent_notification }}'\n ttl: 0\n priority: high",
"config": [
{
"name": "swimming pool pump on today",
"room": "swimming_pool",
"type": "sensor",
"id": {
"entity_id": "sensor.swimming_pool_pump_on_today",
"device_id": null
}
}
]
},
{
"id": "offline_detection_for_z2m_devices_with_sensor",
"automation": "- id: offline_detection_for_z2m_devices_with_sensor\n alias: Offline detection for Z2M devices with sensor z2m_offline_devices\n description: Offline detection for Z2M devices with sensor z2m_offline_devices\n mode: single\n trigger:\n - platform: state\n entity_id:\n - sensor.z2m_offline_devices\n from: null\n to: null\n condition: []\n action:\n - service: notify.marco\n metadata: {}\n data:\n message: The following Zigbee Devices are offline {{states('sensor.z2m_offline_devices')}}",
"config": [
{
"name": "z2m offline devices",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.z2m_offline_devices",
"device_id": null
}
}
]
},
{
"id": "open_office_cover_if_is_too_dark",
"automation": "- id: open_office_cover_if_is_too_dark\n alias: Open office cover when it is too dark\n description: If it is too dark, it automatically adjusts the shutter position.\n mode: single\n trigger:\n - platform: state\n entity_id:\n - binary_sensor.sensor_occupancy_office_occupancy\n to: 'on'\n for:\n hours: 0\n minutes: 0\n seconds: 0\n alias: When someone in the office\n - platform: numeric_state\n entity_id: sensor.sensor_presence_office_illuminance\n for:\n hours: 0\n minutes: 2\n seconds: 0\n below: 350\n alias: When it is too dark\n condition:\n - condition: sun\n before: sunset\n after: sunrise\n - condition: state\n entity_id: switch.plug_monitor\n state: 'on'\n alias: Monitor is On\n - condition: state\n entity_id: input_boolean.anyone_home\n state: 'on'\n - condition: numeric_state\n entity_id: cover.estores_escritorio\n attribute: current_position\n below: 75\n alias: Curtains are below 75\n action:\n - service: cover.set_cover_position\n data:\n position: 75\n target:\n entity_id: cover.estores_escritorio",
"config": [
{
"name": "anyone home",
"room": null,
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.anyone_home",
"device_id": null
}
},
{
"name": "sensor occupancy office occupancy",
"room": "office",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.sensor_occupancy_office_occupancy",
"device_id": null
}
},
{
"name": "sensor presence office illuminance",
"room": "office",
"type": "sensor",
"id": {
"entity_id": "sensor.sensor_presence_office_illuminance",
"device_id": null
}
},
{
"name": "plug monitor",
"room": "office",
"type": "switch",
"id": {
"entity_id": "switch.plug_monitor",
"device_id": null
}
},
{
"name": "estores escritorio",
"room": "office",
"type": "cover",
"id": {
"entity_id": "cover.estores_escritorio",
"device_id": null
}
}
]
},
{
"id": "remote_toggle_garage",
"automation": "- id: remote_toggle_garage\n alias: Toggle garage using remote.tuya.garagem\n mode: single\n trigger:\n - platform: device\n domain: mqtt\n device_id: 149b39eaad8da492f392577d03198112\n type: action\n subtype: 1_single\n discovery_id: 0xa4c1387d28db6c69 action_1_single\n action:\n - service: script.garage\n data: {}",
"config": [
{
"name": "tuya garagem remote",
"room": "garage",
"type": "remote",
"id": {
"entity_id": null,
"device_id": "149b39eaad8da492f392577d03198112"
}
},
{
"name": "Garage",
"room": "Garage",
"type": "script",
"id": {
"entity_id": "script.garage",
"device_id": null
}
}
]
},
{
"id": "remote_toggle_gate_button_3",
"automation": "- id: remote_toggle_gate_button_3\n alias: Toggle gate door using remote.tuya.garagem button 3\n mode: single\n trigger:\n - platform: device\n domain: mqtt\n device_id: 149b39eaad8da492f392577d03198112\n type: action\n subtype: 3_single\n action:\n - service: switch.toggle\n data: {}\n target:\n entity_id: switch.portao_exterior_switch_0",
"config": [
{
"name": "tuya garagem remote",
"room": "garage",
"type": "remote",
"id": {
"entity_id": null,
"device_id": "149b39eaad8da492f392577d03198112"
}
},
{
"name": "portao exterior switch 0",
"room": "exterior",
"type": "switch",
"id": {
"entity_id": "switch.portao_exterior_switch_0",
"device_id": null
}
}
]
},
{
"id": "remote_tuya_button_2",
"automation": "- id: remote_tuya_button_2\n alias: Open and close garage using remote.tuya.garagem button 2\n mode: single\n trigger:\n - platform: device\n domain: mqtt\n device_id: 149b39eaad8da492f392577d03198112\n type: action\n subtype: 2_single\n action:\n - service: script.garage\n data: {}\n alias: Open garage door\n - delay:\n hours: 0\n minutes: 0\n seconds: 30\n milliseconds: 0\n - service: script.garage\n data: {}\n alias: Close garage door",
"config": [
{
"name": "tuya garagem remote",
"room": "garage",
"type": "remote",
"id": {
"entity_id": null,
"device_id": "149b39eaad8da492f392577d03198112"
}
},
{
"name": "Garage",
"room": "Garage",
"type": "script",
"id": {
"entity_id": "script.garage",
"device_id": null
}
}
]
},
{
"id": "send_notification_garage_door_is_open",
"automation": "- id: send_notification_garage_door_is_open\n alias: The garage door is open for a while\n mode: restart\n max_exceeded: silent\n variables:\n notify_device: notify.ha_mobile_apps\n trigger_entity: binary_sensor.sensor_garage_door_contact\n notification_title: Garagem Aberta\n persistent_notification: true\n trigger:\n - platform: state\n entity_id:\n - binary_sensor.sensor_garage_door_contact\n to: 'on'\n for: 00:15:00\n - platform: time_pattern\n minutes: /20\n - platform: state\n entity_id:\n - alarm_control_panel.ajax_security_system\n to: armed_home\n condition:\n - condition: or\n conditions:\n - condition: state\n entity_id: binary_sensor.sensor_garage_door_contact\n state: 'on'\n for:\n hours: 0\n minutes: 45\n seconds: 0\n alias: Door open for more than 45min\n - condition: and\n alias: Door open and nobody home\n conditions:\n - condition: state\n entity_id: binary_sensor.sensor_garage_door_contact\n state: 'on'\n - condition: or\n conditions:\n - condition: state\n entity_id: input_boolean.anyone_home\n state: 'off'\n - condition: state\n entity_id: alarm_control_panel.ajax_security_system\n state: armed_home\n action:\n - alias: Set up variables for the actions\n variables:\n action_close: '{{ ''CLOSE_GARAGE_'' ~ context.id }}'\n action_ignore: '{{ ''IGNORE_'' ~ context.id }}'\n - alias: Ask to close the garage door\n service: notify.ha_mobile_apps\n data:\n title: '{{ notification_title }}'\n message: Garagem aberta. Pretendes fechar?\n data:\n tag: '{{ notification_title }}'\n persistent: '{{ persistent_notification }}'\n ttl: 0\n priority: high\n actions:\n - action: '{{ action_close }}'\n title: Fechar\n - action: '{{ action_ignore }}'\n title: Ignorar\n - alias: Wait for a response\n wait_for_trigger:\n - platform: event\n event_type: mobile_app_notification_action\n event_data:\n action: '{{ action_close }}'\n - platform: event\n event_type: mobile_app_notification_action\n event_data:\n action: '{{ action_ignore }}'\n - alias: Perform the action\n choose:\n - conditions: '{{ (wait.trigger.event.data.action == action_close) and (is_state(''binary_sensor.sensor_garage_door_contact'',\n ''on'')) }}'\n sequence:\n - service: script.garage\n data: {}",
"config": [
{
"name": "anyone home",
"room": null,
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.anyone_home",
"device_id": null
}
},
{
"name": "ajax security system",
"room": null,
"type": "alarm_control_panel",
"id": {
"entity_id": "alarm_control_panel.ajax_security_system",
"device_id": null
}
},
{
"name": "sensor garage door contact",
"room": "garage",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.sensor_garage_door_contact",
"device_id": null
}
},
{
"name": "Garage",
"room": "Garage",
"type": "script",
"id": {
"entity_id": "script.garage",
"device_id": null
}
}
]
},
{
"id": "send_notification_high_humidy_wc_servico",
"automation": "- id: send_notification_high_humidy_wc_servico\n alias: Send notification if humitidy of WC Serviço is high\n mode: restart\n max_exceeded: silent\n variables:\n notification_title: Humidade WC Serviço\n persistent_notification: false\n trigger:\n - platform: numeric_state\n entity_id: sensor.wc_temperature_humidity_sensor_humidity\n for:\n hours: 0\n minutes: 15\n seconds: 0\n above: 90\n - platform: time_pattern\n minutes: /10\n condition:\n - condition: numeric_state\n entity_id: sensor.wc_temperature_humidity_sensor_humidity\n above: 90\n action:\n - alias: Set up variables for the actions\n variables:\n action_ack: '{{ ''ACK_'' ~ context.id }}'\n message: '{{ ''Humidade na WC Serviço demasiado alta: '' ~ states(''sensor.wc_temperature_humidity_sensor_humidity'') ~\n ''%. Liga a ventilação.''}}'\n - alias: Send notification\n service: notify.ha_mobile_apps\n data:\n title: '{{ notification_title }}'\n message: '{{ message }}'\n data:\n tag: '{{ notification_title }}'\n persistent: '{{ persistent_notification }}'\n ttl: 0\n priority: high",
"config": [
{
"name": "wc temperature humidity sensor humidity",
"room": "bathroom",
"type": "sensor",
"id": {
"entity_id": "sensor.wc_temperature_humidity_sensor_humidity",
"device_id": null
}
}
]
},
{
"id": "send_notification_high_humidy_wc_suite",
"automation": "- id: send_notification_high_humidy_wc_suite\n alias: Send notification if humitidy of WC Suite is high\n mode: restart\n max_exceeded: silent\n variables:\n notification_title: Humidade WC Suite\n persistent_notification: false\n trigger:\n - platform: numeric_state\n entity_id: sensor.sensor_temperature_humidity_wc_suite_humidity\n for:\n hours: 0\n minutes: 15\n seconds: 0\n above: 90\n - platform: time_pattern\n minutes: /10\n condition:\n - condition: numeric_state\n entity_id: sensor.sensor_temperature_humidity_wc_suite_humidity\n above: 90\n action:\n - alias: Set up variables for the actions\n variables:\n action_ack: '{{ ''ACK_'' ~ context.id }}'\n message: '{{ ''Humidade na WC Suite demasiado alta: '' ~ states(''sensor.sensor_temperature_humidity_wc_suite_humidity'') ~\n ''%. Liga a ventilação.''}}'\n - alias: Send notification\n service: notify.ha_mobile_apps\n data:\n title: '{{ notification_title }}'\n message: '{{ message }}'\n data:\n tag: '{{ notification_title }}'\n persistent: '{{ persistent_notification }}'\n ttl: 0\n priority: high",
"config": [
{
"name": "sensor temperature humidity wc suite humidity",
"room": "bathroom",
"type": "sensor",
"id": {
"entity_id": "sensor.sensor_temperature_humidity_wc_suite_humidity",
"device_id": null
}
}
]
},
{
"id": "send_notification_toaster_is_on",
"automation": "- id: send_notification_toaster_is_on\n alias: Send notification if toaster is on\n mode: restart\n max_exceeded: silent\n variables:\n notify_device: notify.ha_mobile_apps\n trigger_entity: switch.torradeira_plug\n notification_title: Torradeira ligada\n persistent_notification: true\n trigger:\n - platform: state\n entity_id:\n - switch.torradeira_plug\n to: 'on'\n for: 00:05:00\n - platform: time_pattern\n minutes: /5\n condition:\n - condition: state\n entity_id: switch.torradeira_plug\n state: 'on'\n for:\n hours: 0\n minutes: 5\n seconds: 0\n action:\n - alias: Set up variables for the actions\n variables:\n action_turnoff: '{{ ''TURN_OFF_'' ~ context.id }}'\n action_ignore: '{{ ''IGNORE_'' ~ context.id }}'\n - alias: Ask to turn off the toaster\n service: notify.ha_mobile_apps\n data:\n title: '{{ notification_title }}'\n message: Torradeira ligada por mais de 5 minutos. Pretende desligar?\n data:\n tag: '{{ notification_title }}'\n persistent: '{{ persistent_notification }}'\n ttl: 0\n priority: high\n actions:\n - action: '{{ action_turnoff }}'\n title: Desligar\n - action: '{{ action_ignore }}'\n title: Ignorar\n - alias: Wait for a response\n wait_for_trigger:\n - platform: event\n event_type: mobile_app_notification_action\n event_data:\n action: '{{ action_turnoff }}'\n - platform: event\n event_type: mobile_app_notification_action\n event_data:\n action: '{{ action_ignore }}'\n - alias: Perform the action\n choose:\n - conditions: '{{ wait.trigger.event.data.action == action_turnoff }}'\n sequence:\n - service: switch.turn_off\n data: {}\n target:\n entity_id: switch.torradeira_plug",
"config": [
{
"name": "torradeira plug",
"room": "kitchen",
"type": "switch",
"id": {
"entity_id": "switch.torradeira_plug",
"device_id": null
}
}
]
},
{
"id": "set_anyone_home_off",
"automation": "- id: set_anyone_home_off\n alias: Anyone at home OFF\n description: Set anyone_home to OFF when both are not at home\n mode: single\n trigger:\n - platform: state\n entity_id:\n - person.marco_cunha\n - person.darlene_parreira\n to: not_home\n condition:\n - condition: and\n conditions:\n - condition: state\n entity_id: person.marco_cunha\n state: not_home\n - condition: state\n entity_id: person.darlene_parreira\n state: not_home\n action:\n - service: input_boolean.turn_off\n data: {}\n target:\n entity_id: input_boolean.anyone_home",
"config": [
{
"name": "anyone home",
"room": null,
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.anyone_home",
"device_id": null
}
},
{
"name": "person marco cunha",
"room": null,
"type": "person",
"id": {
"entity_id": "person.marco_cunha",
"device_id": null
}
},
{
"name": "person darlene parreira",
"room": null,
"type": "person",
"id": {
"entity_id": "person.darlene_parreira",
"device_id": null
}
}
]
},
{
"id": "set_anyone_home_on",
"automation": "- id: set_anyone_home_on\n alias: Anyone at home ON\n description: Set anyone_home to on when anyone is at home\n mode: single\n trigger:\n - platform: state\n entity_id:\n - person.darlene_parreira\n - person.marco_cunha\n to: home\n condition:\n - condition: or\n conditions:\n - condition: state\n entity_id: person.marco_cunha\n state: home\n - condition: state\n entity_id: person.darlene_parreira\n state: home\n action:\n - service: input_boolean.turn_on\n data: {}\n target:\n entity_id: input_boolean.anyone_home",
"config": [
{
"name": "anyone home",
"room": null,
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.anyone_home",
"device_id": null
}
},
{
"name": "person marco cunha",
"room": null,
"type": "person",
"id": {
"entity_id": "person.marco_cunha",
"device_id": null
}
},
{
"name": "person darlene parreira",
"room": null,
"type": "person",
"id": {
"entity_id": "person.darlene_parreira",
"device_id": null
}
}
]
},
{
"id": "set_both_home_off",
"automation": "- id: set_both_home_off\n alias: Both at home OFF\n description: Set both_home to OFF when both are not at home\n mode: single\n trigger:\n - platform: state\n entity_id:\n - person.marco_cunha\n - person.darlene_parreira\n to: not_home\n condition:\n - condition: or\n conditions:\n - condition: state\n entity_id: person.marco_cunha\n state: not_home\n - condition: state\n entity_id: person.darlene_parreira\n state: not_home\n action:\n - service: input_boolean.turn_off\n data: {}\n target:\n entity_id: input_boolean.both_home",
"config": [
{
"name": "person marco cunha",
"room": null,
"type": "person",
"id": {
"entity_id": "person.marco_cunha",
"device_id": null
}
},
{
"name": "person darlene parreira",
"room": null,
"type": "person",
"id": {
"entity_id": "person.darlene_parreira",
"device_id": null
}
},
{
"name": "both home",
"room": null,
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.both_home",
"device_id": null
}
}
]
},
{
"id": "set_both_home_on",
"automation": "- id: set_both_home_on\n alias: Both at home ON\n description: Set both_home to on when both at home\n mode: single\n trigger:\n - platform: state\n entity_id:\n - person.darlene_parreira\n - person.marco_cunha\n to: home\n condition:\n - condition: and\n conditions:\n - condition: state\n entity_id: person.marco_cunha\n state: home\n - condition: state\n entity_id: person.darlene_parreira\n state: home\n action:\n - service: input_boolean.turn_on\n data: {}\n target:\n entity_id: input_boolean.both_home",
"config": [
{
"name": "person marco cunha",
"room": null,
"type": "person",
"id": {
"entity_id": "person.marco_cunha",
"device_id": null
}
},
{
"name": "person darlene parreira",
"room": null,
"type": "person",
"id": {
"entity_id": "person.darlene_parreira",
"device_id": null
}
},
{
"name": "both home",
"room": null,
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.both_home",
"device_id": null
}
}
]
},
{
"id": "toaster_turn_off_automatically",
"automation": "- id: toaster_turn_off_automatically\n alias: Turn off toaster automatically after 10min\n mode: restart\n max_exceeded: silent\n variables:\n notify_device: notify.ha_mobile_apps\n trigger_entity: switch.torradeira_plug\n notification_title: Torradeira desligada\n persistent_notification: false\n trigger:\n - platform: state\n entity_id:\n - switch.torradeira_plug\n to: 'on'\n for: 00:10:00\n - platform: time_pattern\n minutes: /10\n condition:\n - condition: state\n entity_id: switch.torradeira_plug\n state: 'on'\n for:\n hours: 0\n minutes: 10\n seconds: 0\n action:\n - service: switch.turn_off\n data: {}\n target:\n entity_id: switch.torradeira_plug\n - alias: Notify toaster is off\n service: notify.ha_mobile_apps\n data:\n title: '{{ notification_title }}'\n message: Torradeira desligada automaticamente.\n data:\n tag: '{{ notification_title }}'\n persistent: '{{ persistent_notification }}'\n ttl: 0\n priority: NORMAL",
"config": [
{
"name": "torradeira plug",
"room": "kitchen",
"type": "switch",
"id": {
"entity_id": "switch.torradeira_plug",
"device_id": null
}
}
]
},
{
"id": "turn_off_christmas_tree",
"automation": "- id: turn_off_christmas_tree\n alias: Turn off christmas tree\n description: Turn off christmas tree at 23:01 or if no-one at home\n mode: single\n trigger:\n - platform: time_pattern\n hours: '23'\n minutes: '1'\n seconds: '0'\n - platform: state\n entity_id:\n - input_boolean.anyone_home\n to: 'off'\n condition:\n - condition: or\n conditions:\n - condition: state\n entity_id: input_boolean.anyone_home\n state: 'off'\n - condition: time\n after: '23:01:00'\n alias: After 23:01h\n action:\n - type: turn_off\n device_id: 5ba8c8993aef8a0ad6b1f06452ff8288\n entity_id: switch.christmas_tree_socket_1\n domain: switch",
"config": [
{
"name": "anyone home",
"room": null,
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.anyone_home",
"device_id": null
}
},
{
"name": "christmas tree socket 1",
"room": null,
"type": "switch",
"id": {
"entity_id": "switch.christmas_tree_socket_1",
"device_id": "5ba8c8993aef8a0ad6b1f06452ff8288"
}
}
]
},
{
"id": "turn_off_entrance_ambient_light_when_no_motion_is_detected",
"automation": "- id: turn_off_entrance_ambient_light_when_no_motion_is_detected\n alias: Turn off Entrance Ambient Lights if no motion is detected\n description: ''\n mode: single\n actions:\n - alias: Turn off lights\n parallel:\n - action: light.turn_off\n metadata: {}\n data: {}\n target:\n entity_id: light.candeeiro_ambiente_2\n - action: light.turn_off\n metadata: {}\n data: {}\n target:\n entity_id: light.switch_tomada_poltrona\n triggers:\n - minutes: /20\n trigger: time_pattern\n conditions:\n - condition: numeric_state\n entity_id: sensor.motion_sensor_illuminance\n above: 50",
"config": [
{
"name": "candeeiro ambiente 2",
"room": "entrance",
"type": "light",
"id": {
"entity_id": "light.candeeiro_ambiente_2",
"device_id": null
}
},
{
"name": "switch tomada poltrona",
"room": "entrance",
"type": "light",
"id": {
"entity_id": "light.switch_tomada_poltrona",
"device_id": null
}
},
{
"name": "motion sensor illuminance",
"room": "entrance",
"type": "sensor",
"id": {
"entity_id": "sensor.motion_sensor_illuminance",
"device_id": null
}
}
]
},
{
"id": "turn_off_office_leds_if_no_motion_detected",
"automation": "- id: turn_off_office_leds_if_no_motion_detected\n alias: Turn off Office LEDs if no motion is detected\n description: ''\n mode: single\n trigger:\n - platform: state\n entity_id:\n - sensor.sensor_presence_office_motion_state\n to: none\n for:\n hours: 0\n minutes: 5\n seconds: 0\n - platform: state\n entity_id:\n - binary_sensor.sensor_presence_office_presence\n to: 'off'\n for:\n hours: 0\n minutes: 5\n seconds: 0\n condition:\n - condition: state\n entity_id: light.light_office_leds\n state: 'on'\n action:\n - service: light.turn_off\n target:\n device_id:\n - 5e1d63d99c520bcaf7ab65d64a32e26d\n data: {}",
"config": [
{
"name": "light office leds",
"room": "office",
"type": "light",
"id": {
"entity_id": "light.light_office_leds",
"device_id": "5e1d63d99c520bcaf7ab65d64a32e26d"
}
},
{
"name": "sensor presence office motion state",
"room": "office",
"type": "sensor",
"id": {
"entity_id": "sensor.sensor_presence_office_motion_state",
"device_id": null
}
},
{
"name": "sensor presence office presence",
"room": "office",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.sensor_presence_office_presence",
"device_id": null
}
}
]
},
{
"id": "turn_off_swimming_pool_pump_according_to_energy_usage",
"automation": "- id: turn_off_swimming_pool_pump_according_to_energy_usage\n alias: Turn off swimming pool pump according to the energy usage\n description: Turn off swimming pool pump according to the energy usage\n mode: restart\n max_exceeded: silent\n variables:\n send_notification: false\n notify_device: notify.ha_mobile_apps\n trigger_entity: binary_sensor.sensor_garage_door_contact\n notification_title: Bomba da Piscina\n persistent_notification: false\n trigger:\n - platform: numeric_state\n entity_id: sensor.energy_consumption_mean_over_last_10_minutes\n above: -300\n alias: Not enough energy to have the swimming pool pump working\n - platform: time_pattern\n minutes: /20\n condition:\n - condition: and\n conditions:\n - condition: or\n alias: Worked desired time or not enough energy production\n conditions:\n - condition: template\n value_template: '{{states(''sensor.swimming_pool_pump_on_today'')|float >\n states(''input_number.swimming_pool_minimum_duration_h'')|float}}'\n alias: Swimming pool pump has been running for the required time\n - condition: numeric_state\n entity_id: sensor.energy_consumption_mean_over_last_10_minutes\n above: -150\n alias: Not enough power for the swimming pool pump\n - condition: numeric_state\n entity_id: sensor.bomba_piscina_switch_0_power\n above: 0\n alias: Swimming pool pump working\n - condition: state\n entity_id: schedule.swimming_pool_pump_schedule\n state: 'off'\n alias: Swimming pool pump schedule is OFF\n action:\n - alias: Set up variables for the actions\n variables:\n message: '{{ ''Produção demasiado baixa, consumo: '' ~ states(''sensor.energy_consumption_mean_over_last_10_minutes'') ~\n ''W. Desligada automaticamente.''}}'\n - alias: Perform the action\n service: switch.turn_off\n target:\n device_id: 11352414f861aaceba25adee16b975f5\n - if: '{{ send_notification == true }}'\n then:\n - alias: Send a message to mobile app\n choose:\n - conditions:\n - condition: template\n value_template: '{{states(''sensor.swimming_pool_pump_on_today'')|float\n > states(''input_number.swimming_pool_minimum_duration_h'')|float}}'\n alias: Swimming Pool pump already worked the desired time\n sequence:\n - alias: Inform swimming pool pump was turned off due to time usage\n service: notify.ha_mobile_apps\n data:\n title: '{{ notification_title }}'\n message: '{{ ''Bomba já trabalhou : '' ~ states(''sensor.swimming_pool_pump_on_today'')|float ~\n ''h. Desligada automaticamente.''}}'\n data:\n tag: '{{ notification_title }}'\n persistent: '{{ persistent_notification }}'\n ttl: 0\n priority: high\n - conditions:\n - condition: numeric_state\n entity_id: sensor.average_consumption_inc_pool_pump\n above: -150\n sequence:\n - alias: Inform swimming pool pump was turned off due to energy usage\n service: notify.ha_mobile_apps\n data:\n title: '{{ notification_title }}'\n message: '{{ message }}'\n data:\n tag: '{{ notification_title }}'\n persistent: '{{ persistent_notification }}'\n ttl: 0\n priority: high",
"config": [
{
"name": "energy consumption mean over last 10 minutes",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.energy_consumption_mean_over_last_10_minutes",
"device_id": null
}
},
{
"name": "swimming pool pump schedule",
"room": null,
"type": "schedule",
"id": {
"entity_id": "schedule.swimming_pool_pump_schedule",
"device_id": null
}
},
{
"name": "swimming pool pump",
"room": "swimming_pool",
"type": "switch",
"id": {
"entity_id": null,
"device_id": "11352414f861aaceba25adee16b975f5"
}
},
{
"name": "swimming pool pump on today",
"room": "swimming_pool",
"type": "sensor",
"id": {
"entity_id": "sensor.swimming_pool_pump_on_today",
"device_id": null
}
},
{
"name": "sensor garage door contact",
"room": "garage",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.sensor_garage_door_contact",
"device_id": null
}
},
{
"name": "swimming pool minimum duration h",
"room": "swimming_pool",
"type": "input_number",
"id": {
"entity_id": "input_number.swimming_pool_minimum_duration_h",
"device_id": null
}
},
{
"name": "bomba piscina switch 0 power",
"room": "swimming_pool",
"type": "sensor",
"id": {
"entity_id": "sensor.bomba_piscina_switch_0_power",
"device_id": null
}
},
{
"name": "average consumption inc pool pump",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.average_consumption_inc_pool_pump",
"device_id": null
}
}
]
},
{
"id": "turn_off_ventax_wc_guests",
"automation": "- id: turn_off_ventax_wc_guests\n alias: Turn off ventax if humitidy of WC Guests is normal\n mode: restart\n max_exceeded: silent\n variables:\n notification_title: Humidade WC Serviço\n persistent_notification: false\n send_notification: false\n trigger:\n - platform: template\n value_template: '{{ states(''sensor.wc_temperature_humidity_sensor_humidity'')\n | float(0) < states(''input_number.bathroom_max_humidity_percentage'') | float(0)\n }}'\n for:\n hours: 0\n minutes: 10\n seconds: 0\n - platform: time_pattern\n minutes: /20\n condition:\n - alias: DND is enabled or the humidity is at a normal level\n or:\n - condition: state\n entity_id: schedule.dnd_schedule\n state: 'on'\n alias: DND is enabled\n - and:\n - condition: template\n value_template: \"{{ states('sensor.wc_temperature_humidity_sensor_humidity')\\\n \\ | float(0)<\\n states('input_number.bathroom_max_humidity_percentage')\\\n \\ | float(0) }}\"\n - condition: state\n entity_id: fan.multiswitch_wc_guests_center\n state: 'on'\n action:\n - alias: Set up variables for the actions\n variables:\n action_ack: '{{ ''ACK_'' ~ context.id }}'\n message: '{{ ''Humidade na WC Serviço normal: '' ~ states(''sensor.wc_temperature_humidity_sensor_humidity'') ~\n ''%. Ventilação desligada.''}}'\n - if: '{{ send_notification == true }}'\n then:\n - alias: Send notification\n service: notify.ha_mobile_apps\n data:\n title: '{{ notification_title }}'\n message: '{{ message }}'\n data:\n tag: '{{ notification_title }}'\n persistent: '{{ persistent_notification }}'\n ttl: 0\n priority: high\n - alias: Perform the action\n service: fan.turn_off\n target:\n entity_id: fan.multiswitch_wc_guests_center",
"config": [
{
"name": "wc temperature humidity sensor humidity",
"room": "bathroom",
"type": "sensor",
"id": {
"entity_id": "sensor.wc_temperature_humidity_sensor_humidity",
"device_id": null
}
},
{
"name": "bathroom max humidity percentage",
"room": "bathroom",
"type": "input_number",
"id": {
"entity_id": "input_number.bathroom_max_humidity_percentage",
"device_id": null
}
},
{
"name": "multiswitch wc guests center",
"room": "bathroom",
"type": "fan",
"id": {
"entity_id": "fan.multiswitch_wc_guests_center",
"device_id": null
}
},
{
"name": "dnd schedule",
"room": null,
"type": "schedule",
"id": {
"entity_id": "schedule.dnd_schedule",
"device_id": null
}
}
]
},
{
"id": "turn_off_ventax_wc_suite",
"automation": "- id: turn_off_ventax_wc_suite\n alias: Turn off ventax if humitidy of WC Suite is normal\n mode: restart\n max_exceeded: silent\n variables:\n notification_title: Humidade WC Suite\n persistent_notification: false\n send_notification: false\n trigger:\n - platform: template\n value_template: '{{ states(''sensor.sensor_temperature_humidity_wc_suite_humidity'')\n | float(0) < states(''input_number.bathroom_max_humidity_percentage'') | float(0)\n }}'\n for:\n hours: 0\n minutes: 10\n seconds: 0\n - platform: time_pattern\n minutes: /20\n condition:\n - alias: DND is enabled or the humidity is at a normal level\n or:\n - condition: state\n entity_id: schedule.dnd_schedule\n state: 'on'\n alias: DND is enabled\n - and:\n - condition: template\n value_template: \"{{ states('sensor.sensor_temperature_humidity_wc_suite_humidity')\\\n \\ | float(0) <\\n states('input_number.bathroom_max_humidity_percentage')\\\n \\ | float(0) }}\"\n - condition: state\n entity_id: fan.multiswitch_wc_suite_ventax\n state: 'on'\n action:\n - alias: Set up variables for the actions\n variables:\n action_ack: '{{ ''ACK_'' ~ context.id }}'\n message: '{{ ''Humidade na WC Suite normal: '' ~ states(''sensor.sensor_temperature_humidity_wc_suite_humidity'') ~\n ''%. Ventilação desligada.''}}'\n - if: '{{ send_notification == true }}'\n then:\n - alias: Send notification\n service: notify.ha_mobile_apps\n data:\n title: '{{ notification_title }}'\n message: '{{ message }}'\n data:\n tag: '{{ notification_title }}'\n persistent: '{{ persistent_notification }}'\n ttl: 0\n priority: high\n - alias: Perform the action\n service: fan.turn_off\n target:\n entity_id: fan.multiswitch_wc_suite_ventax",
"config": [
{
"name": "sensor temperature humidity wc suite humidity",
"room": "bathroom",
"type": "sensor",
"id": {
"entity_id": "sensor.sensor_temperature_humidity_wc_suite_humidity",
"device_id": null
}
},
{
"name": "bathroom max humidity percentage",
"room": "bathroom",
"type": "input_number",
"id": {
"entity_id": "input_number.bathroom_max_humidity_percentage",
"device_id": null
}
},
{
"name": "multiswitch wc suite ventax",
"room": "bathroom",
"type": "fan",
"id": {
"entity_id": "fan.multiswitch_wc_suite_ventax",
"device_id": null
}
},
{
"name": "dnd schedule",
"room": null,
"type": "schedule",
"id": {
"entity_id": "schedule.dnd_schedule",
"device_id": null
}
}
]
},
{
"id": "turn_on_christmas_tree",
"automation": "- id: turn_on_christmas_tree\n alias: Turn on christmas tree\n description: Turn on christmas tree if anyone at home after sunset\n mode: single\n trigger:\n - platform: sun\n event: sunset\n offset: 00:20:00\n - platform: state\n entity_id:\n - input_boolean.anyone_home\n to: 'on'\n condition:\n - condition: and\n conditions:\n - condition: state\n entity_id: input_boolean.anyone_home\n state: 'on'\n - condition: sun\n after: sunset\n after_offset: 00:20:00\n before: sunrise\n - condition: time\n before: '23:00:00'\n alias: Before 23h\n action:\n - type: turn_on\n device_id: 5ba8c8993aef8a0ad6b1f06452ff8288\n entity_id: switch.christmas_tree_socket_1\n domain: switch",
"config": [
{
"name": "anyone home",
"room": null,
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.anyone_home",
"device_id": null
}
},
{
"name": "christmas tree socket 1",
"room": null,
"type": "switch",
"id": {
"entity_id": "switch.christmas_tree_socket_1",
"device_id": "5ba8c8993aef8a0ad6b1f06452ff8288"
}
}
]
},
{
"id": "turn_on_coffee_machine_led_when_door_is_open",
"automation": "- id: turn_on_coffee_machine_led_when_door_is_open\n alias: Turn on coffee machine LED when door is open\n mode: single\n trigger:\n - platform: state\n entity_id:\n - binary_sensor.sensor_motion_coffee_machine_occupancy\n from: 'off'\n to: 'on'\n alias: Door opened\n action:\n - service: script.turn_on\n target:\n entity_id: script.turn_on_coffee_machine_led\n data:\n variables:\n duration: 10",
"config": [
{
"name": "sensor motion coffee machine occupancy",
"room": "kitchen",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.sensor_motion_coffee_machine_occupancy",
"device_id": null
}
},
{
"name": "Turn On",
"room": null,
"type": "script",
"id": {
"entity_id": "script.turn_on",
"device_id": null
}
},
{
"name": "Turn On Coffee Machine LED",
"room": "Kitchen",
"type": "script",
"id": {
"entity_id": "script.turn_on_coffee_machine_led",
"device_id": null
}
}
]
},
{
"id": "turn_on_entrance_ambient_lights_when_motion_is_detected",
"automation": "- id: turn_on_entrance_ambient_lights_when_motion_is_detected\n alias: Turn on entrance ambient lights if motion is detected\n description: ''\n mode: single\n triggers:\n - trigger: state\n entity_id:\n - binary_sensor.motion_sensor_occupancy\n condition:\n - condition: numeric_state\n entity_id: sensor.motion_sensor_illuminance\n below: 30\n - condition: not\n alias: Active mode is not SLEEP\n conditions:\n - condition: state\n entity_id: input_text.active_mode\n state: SLEEP\n actions:\n - alias: Turn on lights\n parallel:\n - action: light.turn_on\n metadata: {}\n data: {}\n target:\n entity_id: light.candeeiro_ambiente_2\n - action: light.turn_on\n metadata: {}\n data: {}\n target:\n entity_id: light.switch_tomada_poltrona",
"config": [
{
"name": "active mode",
"room": null,
"type": "input_text",
"id": {
"entity_id": "input_text.active_mode",
"device_id": null
}
},
{
"name": "candeeiro ambiente 2",
"room": "entrance",
"type": "light",
"id": {
"entity_id": "light.candeeiro_ambiente_2",
"device_id": null
}
},
{
"name": "switch tomada poltrona",
"room": "entrance",
"type": "light",
"id": {
"entity_id": "light.switch_tomada_poltrona",
"device_id": null
}
},
{
"name": "motion sensor illuminance",
"room": "entrance",
"type": "sensor",
"id": {
"entity_id": "sensor.motion_sensor_illuminance",
"device_id": null
}
},
{
"name": "motion sensor occupancy",
"room": "entrance",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.motion_sensor_occupancy",
"device_id": null
}
}
]
},
{
"id": "turn_on_external_led_if_entrance_door_is_open",
"automation": "- id: turn_on_external_led_if_entrance_door_is_open\n alias: Turn on external led if entrance door is open\n mode: single\n trigger:\n - platform: state\n entity_id:\n - binary_sensor.door_entrance_contact\n to: 'on'\n from: 'off'\n alias: Entrance door opened\n condition:\n - condition: sun\n after: sunset\n before: sunrise\n action:\n - service: script.turn_on_exterior_led\n data:\n duration: 15",
"config": [
{
"name": "door entrance contact",
"room": "entrance",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.door_entrance_contact",
"device_id": null
}
},
{
"name": "Turn On",
"room": null,
"type": "script",
"id": {
"entity_id": "script.turn_on",
"device_id": null
}
},
{
"name": "Turn On Exterior LED",
"room": "Exterior",
"type": "script",
"id": {
"entity_id": "script.turn_on_exterior_led",
"device_id": null
}
}
]
},
{
"id": "turn_on_external_led_if_motion_detected_frente",
"automation": "- id: turn_on_external_led_if_motion_detected_frente\n alias: Turn on external led if motion is detected in Frente\n mode: single\n max_exceeded: silent\n variables:\n camera: frente\n trigger:\n - platform: mqtt\n topic: frigate/events\n payload: frente/new\n value_template: '{{ value_json[''after''][''camera''] | lower | replace(''-'',''_'')\n }}/{{ value_json[''type'']}}'\n condition:\n - condition: or\n alias: It must be a person or a car detected\n conditions:\n - condition: template\n value_template: '{{ trigger.payload_json[''after''][''label''] == ''person''\n }}'\n alias: A Person\n - condition: template\n value_template: '{{ trigger.payload_json[''after''][''label''] == ''car'' }}'\n alias: A Car\n - condition: template\n value_template: '{{ trigger.payload_json[''after''][''entered_zones'']|length\n > 0 }}'\n alias: Must entered a zone, otherwise ignore it\n action:\n - service: script.turn_on_exterior_led\n data:\n duration: 10",
"config": [
{
"name": "Turn On",
"room": null,
"type": "script",
"id": {
"entity_id": "script.turn_on",
"device_id": null
}
},
{
"name": "Turn On Exterior LED",
"room": "Exterior",
"type": "script",
"id": {
"entity_id": "script.turn_on_exterior_led",
"device_id": null
}
}
]
},
{
"id": "turn_on_external_led_if_motion_detected_garagem",
"automation": "- id: turn_on_external_led_if_motion_detected_garagem\n alias: Turn on external led if motion is detected in Garage\n mode: single\n max_exceeded: silent\n variables:\n camera: garagem\n trigger:\n - platform: mqtt\n topic: frigate/events\n payload: garagem/new\n value_template: '{{ value_json[''after''][''camera''] | lower | replace(''-'',''_'')\n }}/{{ value_json[''type'']}}'\n condition:\n - condition: or\n alias: It must be a person or a car detected\n conditions:\n - condition: template\n value_template: '{{ trigger.payload_json[''after''][''label''] == ''person''\n }}'\n alias: A Person\n - condition: template\n value_template: '{{ trigger.payload_json[''after''][''label''] == ''car'' }}'\n alias: A Car\n - condition: template\n value_template: '{{ trigger.payload_json[''after''][''entered_zones'']|length\n > 0 }}'\n alias: Must entered a zone, otherwise ignore it\n action:\n - service: script.turn_on_exterior_led\n data:\n duration: 10",
"config": [
{
"name": "Turn On",
"room": null,
"type": "script",
"id": {
"entity_id": "script.turn_on",
"device_id": null
}
},
{
"name": "Turn On Exterior LED",
"room": "Exterior",
"type": "script",
"id": {
"entity_id": "script.turn_on_exterior_led",
"device_id": null
}
}
]
},
{
"id": "turn_on_external_led_when_garage_door_is_open",
"automation": "- id: turn_on_external_led_when_garage_door_is_open\n alias: Turn on external LED when garage door is open\n mode: single\n trigger:\n - platform: state\n entity_id:\n - binary_sensor.sensor_garage_door_contact\n from: 'off'\n to: 'on'\n alias: Garage door opened\n condition:\n - condition: sun\n after: sunset\n before: sunrise\n action:\n - service: script.turn_on\n target:\n entity_id: script.turn_on_exterior_led\n data:\n variables:\n duration: 15",
"config": [
{
"name": "sensor garage door contact",
"room": "garage",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.sensor_garage_door_contact",
"device_id": null
}
},
{
"name": "Turn On",
"room": null,
"type": "script",
"id": {
"entity_id": "script.turn_on",
"device_id": null
}
},
{
"name": "Turn On Exterior LED",
"room": "Exterior",
"type": "script",
"id": {
"entity_id": "script.turn_on_exterior_led",
"device_id": null
}
}
]
},
{
"id": "turn_on_external_led_when_outside_gate_is_open",
"automation": "- id: turn_on_external_led_when_outside_gate_is_open\n alias: Turn on external LED when outside gate is open\n mode: single\n trigger:\n - platform: state\n entity_id:\n - switch.portao_exterior_switch_0\n from: null\n to: 'on'\n alias: Outside gate opened\n condition:\n - condition: sun\n after: sunset\n before: sunrise\n action:\n - service: script.turn_on\n target:\n entity_id: script.turn_on_exterior_led\n data:\n variables:\n duration: 15",
"config": [
{
"name": "portao exterior switch 0",
"room": "exterior",
"type": "switch",
"id": {
"entity_id": "switch.portao_exterior_switch_0",
"device_id": null
}
},
{
"name": "Turn On",
"room": null,
"type": "script",
"id": {
"entity_id": "script.turn_on",
"device_id": null
}
},
{
"name": "Turn On Exterior LED",
"room": "Exterior",
"type": "script",
"id": {
"entity_id": "script.turn_on_exterior_led",
"device_id": null
}
}
]
},
{
"id": "turn_on_office_leds_if_motion_detected",
"automation": "- id: turn_on_office_leds_if_motion_detected\n alias: Turn on Office LEDs if motion is detected\n description: ''\n mode: single\n trigger:\n - platform: state\n entity_id:\n - sensor.sensor_presence_office_motion_state\n to: large\n - platform: state\n entity_id:\n - sensor.sensor_presence_office_motion_state\n to: static\n - platform: state\n entity_id:\n - binary_sensor.sensor_presence_office_presence\n to: 'on'\n condition:\n - condition: numeric_state\n entity_id: sensor.sensor_presence_office_illuminance\n below: 800\n action:\n - service: light.turn_on\n data:\n brightness: 20\n target:\n device_id: 5e1d63d99c520bcaf7ab65d64a32e26d",
"config": [
{
"name": "sensor presence office illuminance",
"room": "office",
"type": "sensor",
"id": {
"entity_id": "sensor.sensor_presence_office_illuminance",
"device_id": null
}
},
{
"name": "light office leds",
"room": "office",
"type": "light",
"id": {
"entity_id": "light.light_office_leds",
"device_id": "5e1d63d99c520bcaf7ab65d64a32e26d"
}
},
{
"name": "sensor presence office motion state",
"room": "office",
"type": "sensor",
"id": {
"entity_id": "sensor.sensor_presence_office_motion_state",
"device_id": null
}
},
{
"name": "sensor presence office presence",
"room": "office",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.sensor_presence_office_presence",
"device_id": null
}
}
]
},
{
"id": "turn_on_swimming_pool_pump_according_to_energy_usage",
"automation": "- id: turn_on_swimming_pool_pump_according_to_energy_usage\n alias: Turn on swimming pool pump according to the energy usage & schedule\n description: Turn on swimming pool pump according to the energy usage & schedule\n mode: single\n variables:\n send_notification: false\n notify_device: notify.ha_mobile_apps\n notification_title: Bomba da Piscina\n persistent_notification: false\n trigger:\n - platform: time_pattern\n minutes: /10\n - platform: state\n entity_id:\n - schedule.swimming_pool_pump_schedule\n condition:\n - condition: or\n conditions:\n - condition: and\n alias: Energy consumption conditions\n conditions:\n - condition: template\n value_template: '{{states(''sensor.swimming_pool_pump_on_today'')|float <=\n states(''input_number.swimming_pool_minimum_duration_h'')|float}}'\n alias: Swimming Pool pump working for less than X time\n - condition: numeric_state\n entity_id: sensor.average_consumption_inc_pool_pump\n below: -150\n alias: Enough energy to have the swimming pool pump working\n - condition: numeric_state\n entity_id: sensor.bomba_piscina_switch_0_power\n below: 0.1\n alias: Pump turned off\n - condition: time\n after: 08:00:00\n - condition: state\n entity_id: schedule.swimming_pool_pump_schedule\n state: 'on'\n alias: Swimming pool pump schedule is ON\n action:\n - alias: Perform the action\n service: switch.turn_on\n target:\n device_id: 11352414f861aaceba25adee16b975f5\n - if: '{{ send_notification == true }}'\n then:\n - alias: Inform swimming pool pump was turned on\n service: notify.ha_mobile_apps\n data:\n title: '{{ notification_title }}'\n message: Bomba da piscina ligada\n data:\n tag: '{{ notification_title }}'\n persistent: '{{ persistent_notification }}'\n ttl: 0\n priority: high",
"config": [
{
"name": "swimming pool pump schedule",
"room": null,
"type": "schedule",
"id": {
"entity_id": "schedule.swimming_pool_pump_schedule",
"device_id": null
}
},
{
"name": "swimming pool pump",
"room": "swimming_pool",
"type": "switch",
"id": {
"entity_id": null,
"device_id": "11352414f861aaceba25adee16b975f5"
}
},
{
"name": "swimming pool pump on today",
"room": "swimming_pool",
"type": "sensor",
"id": {
"entity_id": "sensor.swimming_pool_pump_on_today",
"device_id": null
}
},
{
"name": "swimming pool minimum duration h",
"room": "swimming_pool",
"type": "input_number",
"id": {
"entity_id": "input_number.swimming_pool_minimum_duration_h",
"device_id": null
}
},
{
"name": "bomba piscina switch 0 power",
"room": "swimming_pool",
"type": "sensor",
"id": {
"entity_id": "sensor.bomba_piscina_switch_0_power",
"device_id": null
}
},
{
"name": "average consumption inc pool pump",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.average_consumption_inc_pool_pump",
"device_id": null
}
}
]
},
{
"id": "turn_on_ventax_high_humidy_wc_guests",
"automation": "- id: turn_on_ventax_high_humidy_wc_guests\n alias: Turn on ventax if humitidy of WC Guests is high\n mode: restart\n max_exceeded: silent\n variables:\n notification_title: Humidade WC Guests\n persistent_notification: false\n send_notification: false\n trigger:\n - platform: template\n value_template: '{{ states(''sensor.wc_temperature_humidity_sensor_humidity'')\n | float(0) >= states(''input_number.bathroom_max_humidity_percentage'') | float(0)\n }}'\n for:\n hours: 0\n minutes: 5\n seconds: 0\n - platform: time_pattern\n minutes: /20\n condition:\n - condition: template\n value_template: \"{{ states('sensor.wc_temperature_humidity_sensor_humidity') |\\\n \\ float(0) >=\\n states('input_number.bathroom_max_humidity_percentage')\\\n \\ | float(0) }}\"\n - condition: state\n entity_id: fan.multiswitch_wc_guests_center\n state: 'off'\n - condition: state\n entity_id: schedule.dnd_schedule\n state: 'off'\n action:\n - alias: Set up variables for the actions\n variables:\n action_ack: '{{ ''ACK_'' ~ context.id }}'\n message: '{{ ''Humidade na WC Serviço demasiado alta: '' ~ states(''sensor.wc_temperature_humidity_sensor_humidity'') ~\n ''%. Ventilação ligada.''}}'\n - if: '{{ send_notification == true }}'\n then:\n - alias: Send notification\n service: notify.ha_mobile_apps\n data:\n title: '{{ notification_title }}'\n message: '{{ message }}'\n data:\n tag: '{{ notification_title }}'\n persistent: '{{ persistent_notification }}'\n ttl: 0\n priority: high\n - alias: Perform the action\n service: fan.turn_on\n target:\n entity_id: fan.multiswitch_wc_guests_center",
"config": [
{
"name": "wc temperature humidity sensor humidity",
"room": "bathroom",
"type": "sensor",
"id": {
"entity_id": "sensor.wc_temperature_humidity_sensor_humidity",
"device_id": null
}
},
{
"name": "bathroom max humidity percentage",
"room": "bathroom",
"type": "input_number",
"id": {
"entity_id": "input_number.bathroom_max_humidity_percentage",
"device_id": null
}
},
{
"name": "multiswitch wc guests center",
"room": "bathroom",
"type": "fan",
"id": {
"entity_id": "fan.multiswitch_wc_guests_center",
"device_id": null
}
},
{
"name": "dnd schedule",
"room": null,
"type": "schedule",
"id": {
"entity_id": "schedule.dnd_schedule",
"device_id": null
}
}
]
},
{
"id": "turn_on_ventax_high_humidy_wc_suite",
"automation": "- id: turn_on_ventax_high_humidy_wc_suite\n alias: Turn on ventax if humitidy of WC Suite is high\n mode: restart\n max_exceeded: silent\n variables:\n notification_title: Humidade WC Suite\n persistent_notification: false\n send_notification: false\n trigger:\n - platform: template\n value_template: '{{ states(''sensor.sensor_temperature_humidity_wc_suite_humidity'')\n | float(0)>= states(''input_number.bathroom_max_humidity_percentage'') | float(0)}}'\n for:\n hours: 0\n minutes: 5\n seconds: 0\n - platform: time_pattern\n minutes: /20\n condition:\n - condition: template\n value_template: \"{{ states('sensor.sensor_temperature_humidity_wc_suite_humidity')\\\n \\ | float(0) >=\\n states('input_number.bathroom_max_humidity_percentage')\\\n \\ | float(0)}}\"\n - condition: state\n entity_id: fan.multiswitch_wc_suite_ventax\n state: 'off'\n - condition: state\n entity_id: schedule.dnd_schedule\n state: 'off'\n action:\n - alias: Set up variables for the actions\n variables:\n action_ack: '{{ ''ACK_'' ~ context.id }}'\n message: '{{ ''Humidade na WC Suite demasiado alta: '' ~ states(''sensor.sensor_temperature_humidity_wc_suite_humidity'') ~\n ''%. Ventilação ligada.''}}'\n - if: '{{ send_notification == true }}'\n then:\n - alias: Send notification\n service: notify.ha_mobile_apps\n data:\n title: '{{ notification_title }}'\n message: '{{ message }}'\n data:\n tag: '{{ notification_title }}'\n persistent: '{{ persistent_notification }}'\n ttl: 0\n priority: high\n - alias: Perform the action\n service: fan.turn_on\n target:\n entity_id: fan.multiswitch_wc_suite_ventax",
"config": [
{
"name": "sensor temperature humidity wc suite humidity",
"room": "bathroom",
"type": "sensor",
"id": {
"entity_id": "sensor.sensor_temperature_humidity_wc_suite_humidity",
"device_id": null
}
},
{
"name": "bathroom max humidity percentage",
"room": "bathroom",
"type": "input_number",
"id": {
"entity_id": "input_number.bathroom_max_humidity_percentage",
"device_id": null
}
},
{
"name": "multiswitch wc suite ventax",
"room": "bathroom",
"type": "fan",
"id": {
"entity_id": "fan.multiswitch_wc_suite_ventax",
"device_id": null
}
},
{
"name": "dnd schedule",
"room": null,
"type": "schedule",
"id": {
"entity_id": "schedule.dnd_schedule",
"device_id": null
}
}
]
}
]