AutomationDataset/guibrazlima/description-ready.json

3418 lines
162 KiB
JSON
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[
{
"id": "'1755254428695'",
"automation": "- id: '1755254428695'\n alias: 🏊🏻 Piscina - Arranque com excedente FV\n description: ''\n triggers:\n - entity_id: binary_sensor.piscina_excedente_fv_bomba\n to: 'on'\n for: 00:02:00\n trigger: state\n conditions:\n - condition: numeric_state\n entity_id: input_number.piscina_filtracao_min_restantes\n above: 0\n - condition: sun\n after: sunrise\n after_offset: 00:15:00\n before: sunset\n before_offset: -00:15:00\n actions:\n - target:\n entity_id:\n - switch.bomba_piscina\n - switch.bomba_piscina_switch_0\n action: switch.turn_on\n data: {}\n mode: single",
"config": [
{
"name": "pool pump",
"room": "pool",
"type": "switch",
"id": {
"entity_id": "switch.bomba_piscina",
"device_id": null
}
},
{
"name": "pool pump switch 0",
"room": "pool",
"type": "switch",
"id": {
"entity_id": "switch.bomba_piscina_switch_0",
"device_id": null
}
},
{
"name": "pool pump excedent fv sensor",
"room": "pool",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.piscina_excedente_fv_bomba",
"device_id": null
}
},
{
"name": "pool remaining filtration minutes",
"room": "pool",
"type": "input_number",
"id": {
"entity_id": "input_number.piscina_filtracao_min_restantes",
"device_id": null
}
}
]
},
{
"id": "'1755259008848'",
"automation": "- id: '1755259008848'\n alias: Piscina - Manual terminou (desligar e sair do override)\n description: ''\n triggers:\n - event_type: timer.finished\n event_data:\n entity_id: timer.piscina_manual\n trigger: event\n conditions: []\n actions:\n - target:\n entity_id:\n - switch.bomba_piscina_switch_0\n action: switch.turn_off\n data: {}\n - target:\n entity_id: input_boolean.piscina_override_manual\n action: input_boolean.turn_off\n data: {}\n mode: single",
"config": [
{
"name": "pool pump",
"room": "pool",
"type": "switch",
"id": {
"entity_id": "switch.bomba_piscina",
"device_id": null
}
},
{
"name": "pool pump switch 0",
"room": "pool",
"type": "switch",
"id": {
"entity_id": "switch.bomba_piscina_switch_0",
"device_id": null
}
},
{
"name": "pool manual timer",
"room": "pool",
"type": "timer",
"id": {
"entity_id": "timer.piscina_manual",
"device_id": null
}
},
{
"name": "pool override manual",
"room": "pool",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.piscina_override_manual",
"device_id": null
}
}
]
},
{
"id": "'1755339332285'",
"automation": "- id: '1755339332285'\n alias: 🏊🏻 Piscina - Watchdog arranque FV (*/2min) v2\n description: ''\n triggers:\n - minutes: /2\n trigger: time_pattern\n conditions:\n - condition: state\n entity_id: input_boolean.piscina_override_manual\n state: 'off'\n - condition: state\n state: 'off'\n entity_id: switch.bomba_piscina_switch_0\n - condition: numeric_state\n entity_id: input_number.piscina_filtracao_min_restantes\n above: 0\n - condition: state\n entity_id: binary_sensor.piscina_excedente_fv_bomba\n state: 'on'\n - condition: sun\n after: sunrise\n after_offset: 00:15:00\n before: sunset\n before_offset: -00:15:00\n actions:\n - target:\n entity_id: switch.bomba_piscina_switch_0\n action: switch.turn_on\n data: {}\n mode: single",
"config": [
{
"name": "pool pump",
"room": "pool",
"type": "switch",
"id": {
"entity_id": "switch.bomba_piscina",
"device_id": null
}
},
{
"name": "pool pump switch 0",
"room": "pool",
"type": "switch",
"id": {
"entity_id": "switch.bomba_piscina_switch_0",
"device_id": null
}
},
{
"name": "pool pump excedent fv sensor",
"room": "pool",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.piscina_excedente_fv_bomba",
"device_id": null
}
},
{
"name": "pool remaining filtration minutes",
"room": "pool",
"type": "input_number",
"id": {
"entity_id": "input_number.piscina_filtracao_min_restantes",
"device_id": null
}
},
{
"name": "pool override manual",
"room": "pool",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.piscina_override_manual",
"device_id": null
}
}
]
},
{
"id": "'1755339342740'",
"automation": "- id: '1755339342740'\n alias: 🏊🏻 Piscina - Watchdog arranque FV (*/2min) v2\n description: ''\n triggers:\n - minutes: /2\n trigger: time_pattern\n conditions:\n - condition: state\n entity_id: input_boolean.piscina_override_manual\n state: 'off'\n - condition: state\n state: 'off'\n entity_id: switch.bomba_piscina_switch_0\n - condition: numeric_state\n entity_id: input_number.piscina_filtracao_min_restantes\n above: 0\n - condition: state\n entity_id: binary_sensor.piscina_excedente_fv_bomba\n state: 'on'\n - condition: sun\n after: sunrise\n after_offset: 00:15:00\n before: sunset\n before_offset: -00:15:00\n actions:\n - target:\n entity_id: switch.bomba_piscina_switch_0\n action: switch.turn_on\n data: {}\n mode: single",
"config": [
{
"name": "pool pump",
"room": "pool",
"type": "switch",
"id": {
"entity_id": "switch.bomba_piscina",
"device_id": null
}
},
{
"name": "pool pump switch 0",
"room": "pool",
"type": "switch",
"id": {
"entity_id": "switch.bomba_piscina_switch_0",
"device_id": null
}
},
{
"name": "pool pump excedent fv sensor",
"room": "pool",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.piscina_excedente_fv_bomba",
"device_id": null
}
},
{
"name": "pool remaining filtration minutes",
"room": "pool",
"type": "input_number",
"id": {
"entity_id": "input_number.piscina_filtracao_min_restantes",
"device_id": null
}
},
{
"name": "pool override manual",
"room": "pool",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.piscina_override_manual",
"device_id": null
}
}
]
},
{
"id": "'1755339343598'",
"automation": "- id: '1755339343598'\n alias: 🏊🏻 Piscina - Watchdog arranque FV (*/2min) v2\n description: ''\n triggers:\n - minutes: /2\n trigger: time_pattern\n conditions:\n - condition: state\n entity_id: input_boolean.piscina_override_manual\n state: 'off'\n - condition: state\n state: 'off'\n entity_id: switch.bomba_piscina_switch_0\n - condition: numeric_state\n entity_id: input_number.piscina_filtracao_min_restantes\n above: 0\n - condition: state\n entity_id: binary_sensor.piscina_excedente_fv_bomba\n state: 'on'\n - condition: sun\n after: sunrise\n after_offset: 00:15:00\n before: sunset\n before_offset: -00:15:00\n actions:\n - target:\n entity_id: switch.bomba_piscina_switch_0\n action: switch.turn_on\n data: {}\n mode: single",
"config": [
{
"name": "pool pump",
"room": "pool",
"type": "switch",
"id": {
"entity_id": "switch.bomba_piscina",
"device_id": null
}
},
{
"name": "pool pump switch 0",
"room": "pool",
"type": "switch",
"id": {
"entity_id": "switch.bomba_piscina_switch_0",
"device_id": null
}
},
{
"name": "pool pump excedent fv sensor",
"room": "pool",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.piscina_excedente_fv_bomba",
"device_id": null
}
},
{
"name": "pool remaining filtration minutes",
"room": "pool",
"type": "input_number",
"id": {
"entity_id": "input_number.piscina_filtracao_min_restantes",
"device_id": null
}
},
{
"name": "pool override manual",
"room": "pool",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.piscina_override_manual",
"device_id": null
}
}
]
},
{
"id": "'1717785108600'",
"automation": "- id: '1717785108600'\n alias: SpeedTests\n description: ''\n trigger:\n - platform: time\n at: 06:30:00\n - platform: time\n at: '18:30:00'\n - event: sunrise\n offset: -00:35:00\n platform: sun\n condition: []\n action:\n - service: homeassistant.update_entity\n data: {}\n target:\n entity_id: sensor.speedtest_download\n mode: single",
"config": [
{
"name": "speedtest download",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.speedtest_download",
"device_id": null
}
}
]
},
{
"id": "'1717785145333'",
"automation": "- id: '1717785145333'\n alias: '[🏡] Callback to open gate from action'\n description: ''\n trigger:\n - platform: event\n event_type: mobile_app_notification_action\n event_data:\n action: ABRIR_PORTAO\n condition: []\n action:\n - service: cover.open_cover\n data: {}\n target:\n entity_id:\n - cover.gate\n mode: restart",
"config": [
{
"name": "gate cover",
"room": "garage",
"type": "cover",
"id": {
"entity_id": "cover.gate",
"device_id": null
}
}
]
},
{
"id": "'1717785168033'",
"automation": "- id: '1717785168033'\n alias: '[💡🏡] Garage light on when gate opens/closes'\n description: ''\n trigger:\n - platform: state\n entity_id:\n - cover.gate\n from: closed\n to: open\n for:\n hours: 0\n minutes: 0\n seconds: 2\n - platform: state\n entity_id:\n - cover.gate\n from: open\n to: closed\n for:\n hours: 0\n minutes: 0\n seconds: 2\n condition:\n - condition: state\n entity_id: sun.sun\n state: below_horizon\n action:\n - if:\n - condition: state\n entity_id: cover.gate\n state: open\n then:\n - service: light.turn_on\n metadata: {}\n data: {}\n target:\n entity_id: light.exterior\n - if:\n - condition: state\n entity_id: cover.gate\n state: closed\n for:\n hours: 0\n minutes: 5\n seconds: 0\n then:\n - service: light.turn_off\n metadata: {}\n data: {}\n target:\n entity_id: light.exterior\n mode: single",
"config": [
{
"name": "gate cover",
"room": "garage",
"type": "cover",
"id": {
"entity_id": "cover.gate",
"device_id": null
}
},
{
"name": "exterior light",
"room": "exterior",
"type": "light",
"id": {
"entity_id": "light.exterior",
"device_id": null
}
},
{
"name": "sun sun",
"room": null,
"type": "sun",
"id": {
"entity_id": "sun.sun",
"device_id": null
}
}
]
},
{
"id": "'1717785178989'",
"automation": "- id: '1717785178989'\n alias: '[💡🏡]Notificação para ligar o carro ao carregador'\n description: ''\n triggers:\n - trigger: time_pattern\n minutes: /15\n conditions:\n - condition: numeric_state\n entity_id: sensor.i4_edrive40_remaining_battery_percent\n below: 46\n - condition: state\n entity_id: device_tracker.i4_edrive40\n state: home\n actions:\n - delay:\n hours: 0\n minutes: 10\n seconds: 0\n milliseconds: 0\n - repeat:\n sequence:\n - parallel:\n - if:\n - condition: state\n entity_id: binary_sensor.hk_presence_cmouta\n state: 'on'\n then:\n - metadata: {}\n data:\n title: 🔋🚗⚡🔌BMW i4\n message: Amor, não te esqueças de ligar o carro ao carregador! ❤️😘\n action: notify.mobile_app_iphone_de_cristina_3\n - if:\n - condition: state\n entity_id: binary_sensor.hk_presence_gblima\n state: 'on'\n then:\n - metadata: {}\n data:\n message: O i4 não está ligado ao carregador!\n title: 🔋🚗⚡🔌BMW i4\n action: notify.notify\n - delay:\n hours: 0\n minutes: 15\n seconds: 0\n milliseconds: 0\n while:\n - condition: state\n entity_id: device_tracker.i4_edrive40\n state: home\n for:\n hours: 0\n minutes: 0\n seconds: 0\n - condition: numeric_state\n entity_id: sensor.i4_edrive40_remaining_battery_percent\n below: 70\n - condition: state\n entity_id: binary_sensor.i4_edrive40_connection_status\n state: 'off'\n for:\n hours: 0\n minutes: 0\n seconds: 0\n - condition: template\n value_template: '{{ repeat.index <= 8 }}'\n mode: single",
"config": [
{
"name": "bmw i4 battery percent",
"room": "garage",
"type": "sensor",
"id": {
"entity_id": "sensor.i4_edrive40_remaining_battery_percent",
"device_id": null
}
},
{
"name": "bmw i4 tracker",
"room": "garage",
"type": "device_tracker",
"id": {
"entity_id": "device_tracker.i4_edrive40",
"device_id": null
}
},
{
"name": "hk presence cmouta",
"room": "home",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.hk_presence_cmouta",
"device_id": null
}
},
{
"name": "hk presence gblima",
"room": "home",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.hk_presence_gblima",
"device_id": null
}
},
{
"name": "iphone de cristina notify",
"room": null,
"type": "notify",
"id": {
"entity_id": "notify.mobile_app_iphone_de_cristina_3",
"device_id": null
}
},
{
"name": "notify",
"room": null,
"type": "notify",
"id": {
"entity_id": "notify.notify",
"device_id": null
}
},
{
"name": "i4 connection status",
"room": "garage",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.i4_edrive40_connection_status",
"device_id": null
}
}
]
},
{
"id": "'1717786183938'",
"automation": "- id: '1717786183938'\n alias: '[📣🏡] Envia notificação para abrir o portão quando chega a casa'\n description: ''\n trigger:\n - platform: numeric_state\n entity_id:\n - sensor.home_glima_distance\n below: 50\n id: glima1\n - platform: numeric_state\n entity_id:\n - sensor.home_cmouta_distance\n below: 50\n id: cmouta1\n condition: []\n action:\n - if:\n - condition: trigger\n id:\n - glima1\n then:\n - service: notify.mobile_app_glphone\n metadata: {}\n data:\n message: Queres abrir o portão de casa?\n title: 🏡 🔑 Bem-Vindo a casa Guilherme!\n data:\n tag: open-home-gate\n actions:\n - action: ABRIR_PORTAO\n title: Sim\n authenticationRequired: true\n activationMode: background\n icon: sfsymbols:door.garage.closed\n - delay:\n hours: 0\n minutes: 10\n seconds: 0\n milliseconds: 0\n - service: notify.mobile_app_glphone\n metadata: {}\n data:\n data:\n tag: open-home-gate\n message: clear_notification\n - if:\n - condition: trigger\n id:\n - cmouta1\n then:\n - service: notify.mobile_app_iphone_de_cristina_3\n metadata: {}\n data:\n message: Queres abrir o portão de casa?\n title: 🏡 🔑 Bem-Vinda a casa Cristina!\n data:\n tag: open-home-gate\n actions:\n - action: ABRIR_PORTAO\n title: Sim\n authenticationRequired: true\n activationMode: background\n icon: sfsymbols:door.garage.closed\n - delay:\n hours: 0\n minutes: 10\n seconds: 0\n milliseconds: 0\n - service: notify.mobile_app_iphone_de_cristina_3\n metadata: {}\n data:\n message: clear_notification\n data:\n tag: open-home-gate\n mode: single",
"config": [
{
"name": "iphone de cristina notify",
"room": null,
"type": "notify",
"id": {
"entity_id": "notify.mobile_app_iphone_de_cristina_3",
"device_id": null
}
},
{
"name": "glphone notify",
"room": null,
"type": "notify",
"id": {
"entity_id": "notify.mobile_app_glphone",
"device_id": null
}
},
{
"name": "home glima distance",
"room": "home",
"type": "sensor",
"id": {
"entity_id": "sensor.home_glima_distance",
"device_id": null
}
},
{
"name": "home cmouta distance",
"room": "home",
"type": "sensor",
"id": {
"entity_id": "sensor.home_cmouta_distance",
"device_id": null
}
}
]
},
{
"id": "'1717786217050'",
"automation": "- id: '1717786217050'\n alias: '[📣🏡] Notify when garage door was left open for too long'\n description: ''\n triggers:\n - entity_id:\n - cover.gate\n to: open\n for:\n hours: 0\n minutes: 5\n seconds: 0\n from: closed\n trigger: state\n conditions: []\n actions:\n - repeat:\n sequence:\n - action: camera.snapshot\n metadata: {}\n data:\n filename: /config/www/camera_snapshots/mysnap_portao.jpg\n target:\n entity_id: camera.patio_exterior_hd_stream\n - action: telegram_bot.send_message\n metadata: {}\n data:\n message: Está aberto a mais de 5 minutos. Fechar?\n title: 🚙🚨 Portão de casa aberto!🚨\n - action: telegram_bot.send_photo\n metadata: {}\n data:\n authentication: digest\n file: /config/www/camera_snapshots/mysnap_portao.jpg\n - data:\n title: 🚙 Portão de casa aberto!\n message: Está aberto a mais de 5 minutos. Fechar?\n action: notify.notify\n enabled: true\n - delay:\n hours: 0\n minutes: 5\n seconds: 0\n milliseconds: 0\n while:\n - condition: state\n entity_id: cover.gate\n state: open\n - action: camera.snapshot\n metadata: {}\n data:\n filename: /config/www/camera_snapshots/mysnap_portao.jpg\n target:\n entity_id: camera.patio_exterior_hd_stream\n - action: telegram_bot.send_message\n metadata: {}\n data:\n message: O portão está fechado.\n title: 🚙✅Portão de casa fechado.✅\n - action: telegram_bot.send_photo\n metadata: {}\n data:\n authentication: digest\n file: /config/www/camera_snapshots/mysnap_portao.jpg\n - data:\n title: 🚙✅Portão de casa fechado.✅\n message: O portão está fechado.\n action: notify.notify\n enabled: true\n mode: single",
"config": [
{
"name": "gate cover",
"room": "garage",
"type": "cover",
"id": {
"entity_id": "cover.gate",
"device_id": null
}
},
{
"name": "patio exterior hd stream camera",
"room": "exterior",
"type": "camera",
"id": {
"entity_id": "camera.patio_exterior_hd_stream",
"device_id": null
}
},
{
"name": "telegram bot",
"room": null,
"type": "telegram_bot",
"id": {
"entity_id": "telegram_bot.send_message",
"device_id": null
}
},
{
"name": "notify",
"room": null,
"type": "notify",
"id": {
"entity_id": "notify.notify",
"device_id": null
}
}
]
},
{
"id": "'1717786230999'",
"automation": "- id: '1717786230999'\n alias: '[📣📲] Callback notification to open garage'\n description: ''\n trigger:\n - platform: event\n event_type: ios.action_fired\n event_data:\n actionID: 06BE95EF-F583-440C-9BED-C5FEB7684C15\n context:\n user_id:\n - fc76053283b948f39e0979158ba02875\n alias: gblima\n id: gblima2\n - platform: event\n event_type: ios.action_fired\n event_data:\n actionID: EA13513A-5C16-44C1-B9ED-8AEC747DC1D0\n context:\n user_id:\n - 7df539210ca3465e9ca91c3e2f1bd7e0\n alias: cmouta\n id: cmouta2\n condition: []\n action:\n - service: cover.open_cover\n data: {}\n target:\n entity_id:\n - cover.gate\n - delay:\n hours: 0\n minutes: 2\n seconds: 0\n milliseconds: 0\n - alias: gblima notificações\n if:\n - condition: and\n conditions:\n - condition: trigger\n id:\n - gblima2\n - condition: state\n entity_id: cover.gate\n state: closed\n - condition: state\n entity_id: input_boolean.gblima_present\n state: 'off'\n then:\n - service: notify.mobile_app_glphone\n metadata: {}\n data:\n message: O portão está fechado.✅🔒\n title: 🚗 Ate Logo! 🙂\n data:\n tag: open-home-gate\n - delay:\n hours: 0\n minutes: 5\n seconds: 0\n milliseconds: 0\n - service: notify.mobile_app_glphone\n metadata: {}\n data:\n message: clear_notification\n data:\n tag: open-home-gate\n else:\n - if:\n - condition: and\n conditions:\n - condition: trigger\n id:\n - gblima2\n - condition: state\n entity_id: input_boolean.gblima_present\n state: 'off'\n then:\n - service: notify.mobile_app_glphone\n metadata: {}\n data:\n message: ⚠O portão não fechou!!!⚠️🔓\n data:\n push:\n interruption-level: critical\n title: '------------'\n - alias: cmouta notificações\n if:\n - condition: and\n conditions:\n - condition: trigger\n id:\n - cmouta2\n - condition: state\n entity_id: cover.gate\n state: closed\n - condition: state\n entity_id: input_boolean.cmouta_present\n state: 'off'\n then:\n - service: notify.mobile_app_iphone_de_cristina_3\n data:\n data:\n tag: open-home-gate\n message: O portão está fechado.✅🔒\n title: 🚗 Ate Logo! 🙂\n - delay:\n hours: 0\n minutes: 5\n seconds: 0\n milliseconds: 0\n - service: notify.mobile_app_iphone_de_cristina_3\n metadata: {}\n data:\n message: clear_notification\n data:\n tag: open-home-gate\n else:\n - if:\n - condition: and\n conditions:\n - condition: trigger\n id:\n - cmouta2\n - condition: state\n entity_id: input_boolean.cmouta_present\n state: 'off'\n then:\n - service: notify.mobile_app_iphone_de_cristina_3\n data:\n data:\n push:\n interruption-level: critical\n message: ⚠O portão não fechou!!!⚠️🔓\n title: '------------'\n mode: single",
"config": [
{
"name": "gate cover",
"room": "garage",
"type": "cover",
"id": {
"entity_id": "cover.gate",
"device_id": null
}
},
{
"name": "iphone de cristina notify",
"room": null,
"type": "notify",
"id": {
"entity_id": "notify.mobile_app_iphone_de_cristina_3",
"device_id": null
}
},
{
"name": "glphone notify",
"room": null,
"type": "notify",
"id": {
"entity_id": "notify.mobile_app_glphone",
"device_id": null
}
},
{
"name": "gblima present",
"room": "home",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.gblima_present",
"device_id": null
}
},
{
"name": "cmouta present",
"room": "home",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.cmouta_present",
"device_id": null
}
}
]
},
{
"id": "'1717786241528'",
"automation": "- id: '1717786241528'\n alias: 🏊🏻 Bomba Piscina Noite\n description: ''\n triggers:\n - at: input_datetime.horario_piscina_noite\n trigger: time\n conditions:\n - condition: and\n conditions:\n - condition: template\n value_template: '{%- set filtragemdiaria = state_attr(''sensor.filtragem_piscina_historico_s'',\n ''today-1'') | int -%}\n\n {%- set duration = states(''input_number.pool_pump_duration_lower_threshold'')\n | int -%}\n\n {%- set durationt = duration * 60 -%}\n\n\n {{ filtragemdiaria < durationt }}'\n - condition: or\n conditions:\n - condition: numeric_state\n entity_id: sensor.media_de_cobertura_de_nuvens_10_00_18_00\n above: 35\n - condition: template\n value_template: '{%- set filtragemdiaria = states(''sensor.filtragem_piscina_historico_s'')\n | int -%}\n\n\n\n {{ filtragemdiaria <= 3600 }}'\n actions:\n - if:\n - condition: or\n conditions:\n - condition: state\n entity_id: sensor.season\n state: spring\n - condition: state\n entity_id: sensor.season\n state: summer\n then:\n - metadata: {}\n data: {}\n target:\n entity_id:\n - switch.bomba_piscina_switch_0\n action: switch.turn_on\n - repeat:\n sequence:\n - delay:\n hours: 0\n minutes: 0\n seconds: 5\n milliseconds: 0\n - type: turn_on\n device_id: e5f1b9b1d10308b32ef8f69bc0d20d74\n entity_id: 43f5cd2f7257fed3e55788df58ce96de\n domain: switch\n while:\n - condition: device\n type: is_off\n device_id: e5f1b9b1d10308b32ef8f69bc0d20d74\n entity_id: 43f5cd2f7257fed3e55788df58ce96de\n domain: switch\n - condition: template\n value_template: '{{ repeat.index <= 10 }}'\n - delay: '{{ [(states(''input_number.pool_pump_duration_lower_threshold'') | int)\n * 60 - state_attr(''sensor.filtragem_piscina_historico_s'', ''today-1'') |\n int(0),0] | max }}'\n - target:\n entity_id:\n - switch.bomba_piscina_switch_0\n data: {}\n action: switch.turn_off\n else:\n - metadata: {}\n data: {}\n target:\n entity_id:\n - switch.bomba_piscina_switch_0\n action: switch.turn_on\n - repeat:\n sequence:\n - delay:\n hours: 0\n minutes: 0\n seconds: 5\n milliseconds: 0\n - type: turn_on\n device_id: e5f1b9b1d10308b32ef8f69bc0d20d74\n entity_id: 43f5cd2f7257fed3e55788df58ce96de\n domain: switch\n while:\n - condition: device\n type: is_off\n device_id: e5f1b9b1d10308b32ef8f69bc0d20d74\n entity_id: 43f5cd2f7257fed3e55788df58ce96de\n domain: switch\n - condition: template\n value_template: '{{ repeat.index <= 10 }}'\n - delay: '{{ [(states(''input_number.pool_pump_duration_inverno'') | int) * 60\n - state_attr(''sensor.filtragem_piscina_historico_s'', ''today-1'') | int(0),0]\n | max }}'\n - target:\n entity_id:\n - switch.bomba_piscina_switch_0\n data: {}\n action: switch.turn_off\n mode: single",
"config": [
{
"name": "pool pump",
"room": "pool",
"type": "switch",
"id": {
"entity_id": "switch.bomba_piscina",
"device_id": null
}
},
{
"name": "pool pump switch 0",
"room": "pool",
"type": "switch",
"id": {
"entity_id": "switch.bomba_piscina_switch_0",
"device_id": null
}
},
{
"name": "pool pump duration lower threshold",
"room": "pool",
"type": "input_number",
"id": {
"entity_id": "input_number.pool_pump_duration_lower_threshold",
"device_id": null
}
},
{
"name": "filtration pool history",
"room": "pool",
"type": "sensor",
"id": {
"entity_id": "sensor.filtragem_piscina_historico_s",
"device_id": null
}
},
{
"name": "season sensor",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.season",
"device_id": null
}
},
{
"name": "pool pump duration winter",
"room": "pool",
"type": "input_number",
"id": {
"entity_id": "input_number.pool_pump_duration_inverno",
"device_id": null
}
},
{
"name": "pool night schedule",
"room": "pool",
"type": "input_datetime",
"id": {
"entity_id": "input_datetime.horario_piscina_noite",
"device_id": null
}
},
{
"name": "average cloud cover 10 00 18 00",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.media_de_cobertura_de_nuvens_10_00_18_00",
"device_id": null
}
},
{
"name": "Device 43f5cd2f7257fed3e55788df58ce96de",
"room": "Pool",
"type": "switch",
"id": {
"entity_id": "43f5cd2f7257fed3e55788df58ce96de",
"device_id": null
}
},
{
"name": "Device e5f1b9b1d10308b32ef8f69bc0d20d74",
"room": "Pool",
"type": "switch",
"id": {
"entity_id": "e5f1b9b1d10308b32ef8f69bc0d20d74",
"device_id": null
}
}
]
},
{
"id": "'1717786251723'",
"automation": "- id: '1717786251723'\n alias: 🏊🏻 Cascata\n description: Inicia ou para a Cascata na piscina com 1 click no botão shelly\n triggers:\n - device_id: 50eb20ac53472c3cc1b1da733634d1c8\n domain: bthome\n type: button\n subtype: press\n trigger: device\n conditions: []\n actions:\n - type: toggle\n device_id: ed7ccde197e708b2a6b6cd25ef2e60c5\n entity_id: 44b25a719c3fa50cbbd4ebd6e57fcdb9\n domain: switch\n enabled: true\n mode: single",
"config": [
{
"name": "pool waterfall switch",
"room": "pool",
"type": "switch",
"id": {
"entity_id": "44b25a719c3fa50cbbd4ebd6e57fcdb9",
"device_id": "ed7ccde197e708b2a6b6cd25ef2e60c5"
}
},
{
"name": "pool button device",
"room": "pool",
"type": "device",
"id": {
"entity_id": null,
"device_id": "50eb20ac53472c3cc1b1da733634d1c8"
}
}
]
},
{
"id": "'1717786261877'",
"automation": "- id: '1717786261877'\n alias: 🏊🏻 Hidrojet\n description: ''\n trigger:\n - platform: device\n device_id: 50eb20ac53472c3cc1b1da733634d1c8\n domain: bthome\n type: button\n subtype: double_press\n condition: []\n action:\n - if:\n - condition: device\n type: is_off\n device_id: 8be4eb1cd22d4bd03d7c70c99e84930b\n entity_id: a282d1ef3a0591beb9ddf1392c8e3e42\n domain: switch\n then:\n - type: turn_off\n device_id: e5f1b9b1d10308b32ef8f69bc0d20d74\n entity_id: 43f5cd2f7257fed3e55788df58ce96de\n domain: switch\n - service: automation.turn_off\n data:\n stop_actions: true\n target:\n entity_id: automation.new_automation_3\n - delay:\n hours: 0\n minutes: 0\n seconds: 5\n milliseconds: 0\n - type: turn_on\n device_id: 8be4eb1cd22d4bd03d7c70c99e84930b\n entity_id: a282d1ef3a0591beb9ddf1392c8e3e42\n domain: switch\n - repeat:\n sequence:\n - delay:\n hours: 0\n minutes: 0\n seconds: 30\n milliseconds: 0\n while:\n - condition: device\n type: is_on\n device_id: 8be4eb1cd22d4bd03d7c70c99e84930b\n entity_id: a282d1ef3a0591beb9ddf1392c8e3e42\n domain: switch\n - service: automation.turn_on\n data: {}\n target:\n entity_id: automation.new_automation_3\n else:\n - type: turn_off\n device_id: 8be4eb1cd22d4bd03d7c70c99e84930b\n entity_id: a282d1ef3a0591beb9ddf1392c8e3e42\n domain: switch\n - service: automation.turn_on\n data: {}\n target:\n entity_id: automation.new_automation_3\n mode: restart",
"config": [
{
"name": "pool hydrojet switch",
"room": "pool",
"type": "switch",
"id": {
"entity_id": "a282d1ef3a0591beb9ddf1392c8e3e42",
"device_id": "8be4eb1cd22d4bd03d7c70c99e84930b"
}
},
{
"name": "pool button device",
"room": "pool",
"type": "device",
"id": {
"entity_id": null,
"device_id": "50eb20ac53472c3cc1b1da733634d1c8"
}
},
{
"name": "new automation 3",
"room": null,
"type": "automation",
"id": {
"entity_id": "automation.new_automation_3",
"device_id": null
}
},
{
"name": "Device 43f5cd2f7257fed3e55788df58ce96de",
"room": "Pool",
"type": "switch",
"id": {
"entity_id": "43f5cd2f7257fed3e55788df58ce96de",
"device_id": null
}
},
{
"name": "Device e5f1b9b1d10308b32ef8f69bc0d20d74",
"room": "Pool",
"type": "switch",
"id": {
"entity_id": "e5f1b9b1d10308b32ef8f69bc0d20d74",
"device_id": null
}
}
]
},
{
"id": "'1717786272132'",
"automation": "- id: '1717786272132'\n alias: 🏊🏻 Ligar/Desligar Automação Piscina\n description: Liga e desliga a Wallbox\n triggers:\n - minutes: /5\n trigger: time_pattern\n conditions: []\n actions:\n - if:\n - condition: and\n conditions:\n - condition: sun\n after: sunrise\n before: sunset\n - condition: numeric_state\n entity_id: sensor.duracao_filtragem_piscina_diario_em_segundos\n above: 10800\n - condition: state\n entity_id: device_tracker.i4_edrive40\n state: home\n - condition: state\n entity_id: binary_sensor.i4_edrive40_connection_status\n state: 'on'\n - condition: numeric_state\n entity_id: sensor.i4_edrive40_remaining_battery_percent\n below: 100\n then:\n - data:\n stop_actions: true\n target:\n entity_id: automation.new_automation_3\n action: automation.turn_off\n - metadata: {}\n data: {}\n target:\n entity_id:\n - switch.bomba_piscina_switch_0\n action: switch.turn_off\n - metadata: {}\n data: {}\n target:\n entity_id: switch.wallbox_charging_enabled\n action: switch.turn_on\n else:\n - if:\n - condition: time\n after: 09:00:00\n before: '18:00:00'\n then:\n - data: {}\n target:\n entity_id: automation.new_automation_3\n action: automation.turn_on\n - metadata: {}\n data: {}\n target:\n entity_id: switch.wallbox_charging_enabled\n enabled: false\n action: switch.turn_off\n - metadata: {}\n data:\n skip_condition: true\n target:\n entity_id: automation.new_automation_3\n action: automation.trigger\n else:\n - data:\n stop_actions: true\n target:\n entity_id: automation.new_automation_3\n action: automation.turn_off\n - target:\n entity_id:\n - switch.wallbox_charging_enabled\n data: {}\n enabled: false\n action: switch.turn_on\n mode: single",
"config": [
{
"name": "pool pump",
"room": "pool",
"type": "switch",
"id": {
"entity_id": "switch.bomba_piscina",
"device_id": null
}
},
{
"name": "pool pump switch 0",
"room": "pool",
"type": "switch",
"id": {
"entity_id": "switch.bomba_piscina_switch_0",
"device_id": null
}
},
{
"name": "wallbox charging enabled",
"room": "garage",
"type": "switch",
"id": {
"entity_id": "switch.wallbox_charging_enabled",
"device_id": null
}
},
{
"name": "bmw i4 battery percent",
"room": "garage",
"type": "sensor",
"id": {
"entity_id": "sensor.i4_edrive40_remaining_battery_percent",
"device_id": null
}
},
{
"name": "bmw i4 tracker",
"room": "garage",
"type": "device_tracker",
"id": {
"entity_id": "device_tracker.i4_edrive40",
"device_id": null
}
},
{
"name": "pool daily filtration duration",
"room": "pool",
"type": "sensor",
"id": {
"entity_id": "sensor.duracao_filtragem_piscina_diario_em_segundos",
"device_id": null
}
},
{
"name": "i4 connection status",
"room": "garage",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.i4_edrive40_connection_status",
"device_id": null
}
},
{
"name": "new automation 3",
"room": null,
"type": "automation",
"id": {
"entity_id": "automation.new_automation_3",
"device_id": null
}
},
{
"name": "pool daily filtration",
"room": "pool",
"type": "sensor",
"id": {
"entity_id": "sensor.duracao_filtragem_piscina_diario",
"device_id": null
}
}
]
},
{
"id": "'1717786282800'",
"automation": "- id: '1717786282800'\n alias: 🏊🏻 Variable Piscina timer\n description: ''\n triggers:\n - at: 00:00:00\n trigger: time\n conditions: []\n actions:\n - metadata: {}\n data:\n replace_attributes: false\n value: '{{ states(''sensor.duracao_filtragem_piscina_diario_em_segundos'') |\n default(0) | int }}'\n attributes:\n today-1: '{{ states(''sensor.filtragem_piscina_historico_s'') | default(0)|\n int }}'\n today-2: '{{ state_attr(''sensor.filtragem_piscina_historico_s'',''today-1'')\n | default(0) | int }}'\n today-3: '{{ state_attr(''sensor.filtragem_piscina_historico_s'',''today-2'')\n | default(0) | int }}'\n today-4: '{{ state_attr(''sensor.filtragem_piscina_historico_s'',''today-3'')\n | default(0) | int }}'\n today-5: '{{ state_attr(''sensor.filtragem_piscina_historico_s'',''today-4'')\n | default(0) | int }}'\n today-6: '{{ state_attr(''sensor.filtragem_piscina_historico_s'',''today-5'')\n | default(0) | int }}'\n today-7: '{{ state_attr(''sensor.filtragem_piscina_historico_s'',''today-6'')\n | default(0) | int }}'\n today-8: '{{ state_attr(''sensor.filtragem_piscina_historico_s'',''today-7'')\n | default(0) | int }}'\n today-9: '{{ state_attr(''sensor.filtragem_piscina_historico_s'',''today-8'')\n | default(0) | int }}'\n today-10: '{{ state_attr(''sensor.filtragem_piscina_historico_s'',''today-9'')\n | default(0) | int }}'\n target:\n entity_id: sensor.filtragem_piscina_historico_s\n action: variable.update_sensor\n mode: single",
"config": [
{
"name": "filtration pool history",
"room": "pool",
"type": "sensor",
"id": {
"entity_id": "sensor.filtragem_piscina_historico_s",
"device_id": null
}
},
{
"name": "pool daily filtration duration",
"room": "pool",
"type": "sensor",
"id": {
"entity_id": "sensor.duracao_filtragem_piscina_diario_em_segundos",
"device_id": null
}
},
{
"name": "pool daily filtration",
"room": "pool",
"type": "sensor",
"id": {
"entity_id": "sensor.duracao_filtragem_piscina_diario",
"device_id": null
}
}
]
},
{
"id": "'1717786439250'",
"automation": "- id: '1717786439250'\n alias: 🔋🚗⚡Change charge completion time\n description: ''\n trigger:\n - platform: state\n entity_id:\n - sensor.ev_smart_charging_charging\n attribute: raw_two_days\n condition: []\n action:\n - if:\n - condition: time\n after: 00:00:00\n before: 00:00:00\n weekday:\n - sat\n - fri\n then:\n - service: select.select_option\n metadata: {}\n data:\n option: None\n target:\n entity_id: select.ev_smart_charging_charge_completion_time\n - service: switch.turn_off\n metadata: {}\n data: {}\n target:\n entity_id: switch.ev_smart_charging_continuous_charging_preferred\n else:\n - service: select.select_option\n metadata: {}\n data:\n option: 08:00\n target:\n entity_id: select.ev_smart_charging_charge_completion_time\n - service: switch.turn_on\n metadata: {}\n data: {}\n target:\n entity_id: switch.ev_smart_charging_continuous_charging_preferred\n mode: single",
"config": [
{
"name": "ev smart charging charging",
"room": "garage",
"type": "sensor",
"id": {
"entity_id": "sensor.ev_smart_charging_charging",
"device_id": null
}
},
{
"name": "ev smart charging charge completion time",
"room": "garage",
"type": "select",
"id": {
"entity_id": "select.ev_smart_charging_charge_completion_time",
"device_id": null
}
},
{
"name": "ev smart charging continuous charging preferred",
"room": "garage",
"type": "switch",
"id": {
"entity_id": "switch.ev_smart_charging_continuous_charging_preferred",
"device_id": null
}
}
]
},
{
"id": "'1717786450595'",
"automation": "- id: '1717786450595'\n alias: 🔋🚗⚡Disable i4 Climate if not home\n description: ''\n trigger:\n - platform: state\n entity_id:\n - switch.i4_edrive40_climate\n from: 'off'\n to: 'on'\n condition:\n - condition: device\n device_id: 73087b9e1e3a0ceb0fc6d4024bd9ffe1\n domain: device_tracker\n entity_id: 17973f520f671f084cc637505d0c747d\n type: is_not_home\n - condition: time\n after: 07:40:00\n before: 08:00:00\n weekday:\n - mon\n - tue\n - wed\n - thu\n - fri\n action:\n - service: switch.turn_off\n metadata: {}\n data: {}\n target:\n entity_id: switch.i4_edrive40_climate\n mode: single",
"config": [
{
"name": "i4 climate switch",
"room": "garage",
"type": "switch",
"id": {
"entity_id": "switch.i4_edrive40_climate",
"device_id": null
}
},
{
"name": "Device 17973f520f671f084cc637505d0c747d",
"room": null,
"type": "device_tracker",
"id": {
"entity_id": "17973f520f671f084cc637505d0c747d",
"device_id": null
}
},
{
"name": "Device 73087b9e1e3a0ceb0fc6d4024bd9ffe1",
"room": null,
"type": "device_tracker",
"id": {
"entity_id": "73087b9e1e3a0ceb0fc6d4024bd9ffe1",
"device_id": null
}
}
]
},
{
"id": "'1717786462808'",
"automation": "- id: '1717786462808'\n alias: 🔋🚗⚡EV Connected to Charger\n description: ''\n triggers:\n - entity_id:\n - binary_sensor.i4_edrive40_connection_status\n trigger: state\n id: i4\n - entity_id:\n - sensor.ev_smart_charging_status_2\n trigger: state\n id: x1\n conditions: []\n actions:\n - if:\n - condition: and\n conditions:\n - condition: trigger\n id:\n - i4\n - condition: state\n entity_id: binary_sensor.i4_edrive40_connection_status\n state: 'on'\n then:\n - data: {}\n target:\n entity_id: switch.ev_smart_charging_ev_connected\n action: switch.turn_on\n else:\n - data: {}\n target:\n entity_id: switch.ev_smart_charging_ev_connected\n action: switch.turn_off\n - if:\n - condition: and\n conditions:\n - condition: trigger\n id:\n - x1\n - condition: state\n entity_id: binary_sensor.x1_xdrive25e_connection_status\n state: 'on'\n then:\n - data: {}\n target:\n entity_id:\n - switch.ev_smart_charging_ev_connected_2\n action: switch.turn_on\n else:\n - data: {}\n target:\n entity_id:\n - switch.ev_smart_charging_ev_connected_2\n action: switch.turn_off\n mode: single",
"config": [
{
"name": "i4 connection status",
"room": "garage",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.i4_edrive40_connection_status",
"device_id": null
}
},
{
"name": "ev smart charging status 2",
"room": "garage",
"type": "sensor",
"id": {
"entity_id": "sensor.ev_smart_charging_status_2",
"device_id": null
}
},
{
"name": "ev smart charging ev connected",
"room": "garage",
"type": "switch",
"id": {
"entity_id": "switch.ev_smart_charging_ev_connected",
"device_id": null
}
},
{
"name": "x1 connection status",
"room": "garage",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.x1_xdrive25e_connection_status",
"device_id": null
}
},
{
"name": "ev smart charging ev connected 2",
"room": "garage",
"type": "switch",
"id": {
"entity_id": "switch.ev_smart_charging_ev_connected_2",
"device_id": null
}
}
]
},
{
"id": "'1717786472626'",
"automation": "- id: '1717786472626'\n alias: '🔋🚗⚡EV Set SOC to 80% '\n description: sempre que chega a casa e é ligado ao carregador.\n trigger:\n - platform: device\n device_id: 73087b9e1e3a0ceb0fc6d4024bd9ffe1\n domain: device_tracker\n entity_id: 17973f520f671f084cc637505d0c747d\n type: enters\n zone: zone.home\n condition:\n - condition: time\n after: '18:00:00'\n before: 08:00:00\n weekday:\n - sun\n - mon\n - tue\n - wed\n - thu\n - fri\n - sat\n action:\n - delay:\n hours: 0\n minutes: 5\n seconds: 0\n milliseconds: 0\n - service: number.set_value\n metadata: {}\n data:\n value: '80'\n target:\n entity_id: number.i4_edrive40_target_soc\n mode: single",
"config": [
{
"name": "i4 target soc",
"room": "garage",
"type": "number",
"id": {
"entity_id": "number.i4_edrive40_target_soc",
"device_id": null
}
},
{
"name": "Device 17973f520f671f084cc637505d0c747d",
"room": null,
"type": "device_tracker",
"id": {
"entity_id": "17973f520f671f084cc637505d0c747d",
"device_id": null
}
},
{
"name": "Device 73087b9e1e3a0ceb0fc6d4024bd9ffe1",
"room": null,
"type": "device_tracker",
"id": {
"entity_id": "73087b9e1e3a0ceb0fc6d4024bd9ffe1",
"device_id": null
}
}
]
},
{
"id": "'1717786483857'",
"automation": "- id: '1717786483857'\n alias: 🔋🚗⚡EV Set Target SOC Dia\n description: ''\n trigger:\n - platform: time_pattern\n minutes: /5\n condition:\n - condition: and\n conditions:\n - condition: time\n after: 08:00:00\n before: '18:00:00'\n weekday:\n - sun\n - mon\n - tue\n - wed\n - thu\n - fri\n - sat\n - condition: state\n entity_id: automation.new_automation_3\n state: 'off'\n - condition: state\n entity_id: device_tracker.i4_edrive40\n state: home\n - condition: state\n entity_id: binary_sensor.i4_edrive40_connection_status\n state: 'on'\n enabled: true\n action:\n - if:\n - condition: and\n conditions:\n - condition: numeric_state\n entity_id: number.i4_edrive40_target_soc\n above: 79\n - condition: numeric_state\n entity_id: sensor.i4_edrive40_remaining_battery_percent\n above: 79\n enabled: true\n then:\n - service: number.set_value\n metadata: {}\n data:\n value: '100'\n target:\n entity_id: number.i4_edrive40_target_soc\n mode: single",
"config": [
{
"name": "bmw i4 battery percent",
"room": "garage",
"type": "sensor",
"id": {
"entity_id": "sensor.i4_edrive40_remaining_battery_percent",
"device_id": null
}
},
{
"name": "bmw i4 tracker",
"room": "garage",
"type": "device_tracker",
"id": {
"entity_id": "device_tracker.i4_edrive40",
"device_id": null
}
},
{
"name": "i4 connection status",
"room": "garage",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.i4_edrive40_connection_status",
"device_id": null
}
},
{
"name": "i4 target soc",
"room": "garage",
"type": "number",
"id": {
"entity_id": "number.i4_edrive40_target_soc",
"device_id": null
}
},
{
"name": "new automation 3",
"room": null,
"type": "automation",
"id": {
"entity_id": "automation.new_automation_3",
"device_id": null
}
}
]
},
{
"id": "'1717786494527'",
"automation": "- id: '1717786494527'\n alias: 🔋🚗⚡EV Smart Charging - Start\n description: ''\n triggers:\n - entity_id:\n - sensor.ev_smart_charging_charging\n from: 'Off'\n to: 'On'\n trigger: state\n - entity_id:\n - sensor.ev_smart_charging_charging_2\n from: 'Off'\n to: 'On'\n trigger: state\n conditions: []\n actions:\n - data: {}\n target:\n entity_id: switch.evse_admin_rules_inverted\n action: switch.turn_on\n mode: single",
"config": [
{
"name": "ev smart charging charging",
"room": "garage",
"type": "sensor",
"id": {
"entity_id": "sensor.ev_smart_charging_charging",
"device_id": null
}
},
{
"name": "evse admin rules inverted",
"room": "garage",
"type": "switch",
"id": {
"entity_id": "switch.evse_admin_rules_inverted",
"device_id": null
}
},
{
"name": "ev smart charging charging 2",
"room": "garage",
"type": "sensor",
"id": {
"entity_id": "sensor.ev_smart_charging_charging_2",
"device_id": null
}
}
]
},
{
"id": "'1717786503067'",
"automation": "- id: '1717786503067'\n alias: 🔋🚗⚡EV Smart Charging - Stop\n description: ''\n triggers:\n - entity_id:\n - sensor.ev_smart_charging_charging\n from: 'On'\n to: 'Off'\n trigger: state\n - entity_id:\n - sensor.ev_smart_charging_charging_2\n from: 'On'\n to: 'Off'\n trigger: state\n conditions: []\n actions:\n - data: {}\n target:\n entity_id: switch.evse_admin_rules_inverted\n action: switch.turn_off\n mode: single",
"config": [
{
"name": "ev smart charging charging",
"room": "garage",
"type": "sensor",
"id": {
"entity_id": "sensor.ev_smart_charging_charging",
"device_id": null
}
},
{
"name": "evse admin rules inverted",
"room": "garage",
"type": "switch",
"id": {
"entity_id": "switch.evse_admin_rules_inverted",
"device_id": null
}
},
{
"name": "ev smart charging charging 2",
"room": "garage",
"type": "sensor",
"id": {
"entity_id": "sensor.ev_smart_charging_charging_2",
"device_id": null
}
}
]
},
{
"id": "'1717786511680'",
"automation": "- id: '1717786511680'\n alias: 🔋🚗⚡EV Smart Charging Set AC Current Limit\n description: ''\n trigger:\n - platform: state\n entity_id:\n - binary_sensor.i4_edrive40_charging_status\n from: null\n to: 'on'\n condition:\n - condition: device\n device_id: 73087b9e1e3a0ceb0fc6d4024bd9ffe1\n domain: device_tracker\n entity_id: 17973f520f671f084cc637505d0c747d\n type: is_home\n action:\n - repeat:\n sequence:\n - service: select.select_option\n metadata: {}\n data:\n option: '32'\n target:\n entity_id: select.i4_edrive40_ac_charging_limit\n - delay:\n hours: 0\n minutes: 1\n seconds: 0\n milliseconds: 0\n while:\n - condition: numeric_state\n entity_id: sensor.i4_edrive40_ac_current_limit\n above: 5\n below: 32\n - condition: template\n value_template: '{{ repeat.index <= 30 }}'\n mode: single",
"config": [
{
"name": "i4 ac charging limit",
"room": "garage",
"type": "select",
"id": {
"entity_id": "select.i4_edrive40_ac_charging_limit",
"device_id": null
}
},
{
"name": "i4 ac current limit",
"room": "garage",
"type": "sensor",
"id": {
"entity_id": "sensor.i4_edrive40_ac_current_limit",
"device_id": null
}
},
{
"name": "i4 charging status",
"room": "garage",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.i4_edrive40_charging_status",
"device_id": null
}
},
{
"name": "Device 17973f520f671f084cc637505d0c747d",
"room": null,
"type": "device_tracker",
"id": {
"entity_id": "17973f520f671f084cc637505d0c747d",
"device_id": null
}
},
{
"name": "Device 73087b9e1e3a0ceb0fc6d4024bd9ffe1",
"room": null,
"type": "device_tracker",
"id": {
"entity_id": "73087b9e1e3a0ceb0fc6d4024bd9ffe1",
"device_id": null
}
}
]
},
{
"id": "'1717786521476'",
"automation": "- id: '1717786521476'\n alias: 🔋🚗⚡Help for charging at home\n description: ''\n triggers:\n - entity_id:\n - sensor.ev_smart_charging_charging\n to: 'on'\n trigger: state\n for:\n hours: 0\n minutes: 5\n seconds: 0\n id: i4\n - entity_id:\n - sensor.ev_smart_charging_charging_2\n to: 'on'\n trigger: state\n for:\n hours: 0\n minutes: 5\n seconds: 0\n id: x1\n conditions:\n - condition: or\n conditions:\n - condition: and\n conditions:\n - condition: state\n entity_id: device_tracker.i4_edrive40\n state: home\n - condition: state\n entity_id: binary_sensor.i4_edrive40_connection_status\n state: 'on'\n - condition: numeric_state\n entity_id: sensor.wallbox_charging_power\n below: 2\n - condition: trigger\n id:\n - i4\n - condition: and\n conditions:\n - condition: state\n entity_id: device_tracker.x1_xdrive25e\n state: Home\n - condition: state\n entity_id: binary_sensor.x1_xdrive25e_connection_status\n state: 'on'\n - condition: numeric_state\n entity_id: sensor.wallbox_charging_power\n below: 2\n - condition: trigger\n id:\n - x1\n actions:\n - if:\n - condition: trigger\n id:\n - i4\n then:\n - device_id: 73087b9e1e3a0ceb0fc6d4024bd9ffe1\n domain: lock\n entity_id: 4cad819e94c6b23041776358896b68a0\n type: unlock\n - delay:\n hours: 0\n minutes: 1\n seconds: 0\n milliseconds: 0\n - device_id: 73087b9e1e3a0ceb0fc6d4024bd9ffe1\n domain: lock\n entity_id: 4cad819e94c6b23041776358896b68a0\n type: lock\n - delay:\n hours: 0\n minutes: 1\n seconds: 0\n milliseconds: 0\n - action: button.press\n metadata: {}\n data: {}\n target:\n entity_id: button.ev_smart_charging_manually_start_charging\n - if:\n - condition: trigger\n id:\n - x1\n then:\n - device_id: d2b7376b62ba76e3cebf5d2479e76922\n domain: lock\n entity_id: 2574b858b69f29422a37da5a8a6db887\n type: unlock\n - delay:\n hours: 0\n minutes: 1\n seconds: 0\n milliseconds: 0\n - device_id: d2b7376b62ba76e3cebf5d2479e76922\n domain: lock\n entity_id: 2574b858b69f29422a37da5a8a6db887\n type: lock\n - delay:\n hours: 0\n minutes: 1\n seconds: 0\n milliseconds: 0\n - action: button.press\n metadata: {}\n data: {}\n target:\n entity_id: button.ev_smart_charging_manually_start_charging\n mode: single",
"config": [
{
"name": "bmw i4 tracker",
"room": "garage",
"type": "device_tracker",
"id": {
"entity_id": "device_tracker.i4_edrive40",
"device_id": null
}
},
{
"name": "i4 connection status",
"room": "garage",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.i4_edrive40_connection_status",
"device_id": null
}
},
{
"name": "wallbox charging power",
"room": "garage",
"type": "sensor",
"id": {
"entity_id": "sensor.wallbox_charging_power",
"device_id": null
}
},
{
"name": "ev smart charging charging",
"room": "garage",
"type": "sensor",
"id": {
"entity_id": "sensor.ev_smart_charging_charging",
"device_id": null
}
},
{
"name": "x1 connection status",
"room": "garage",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.x1_xdrive25e_connection_status",
"device_id": null
}
},
{
"name": "ev smart charging charging 2",
"room": "garage",
"type": "sensor",
"id": {
"entity_id": "sensor.ev_smart_charging_charging_2",
"device_id": null
}
},
{
"name": "ev smart charging manually start charging",
"room": "garage",
"type": "button",
"id": {
"entity_id": "button.ev_smart_charging_manually_start_charging",
"device_id": null
}
},
{
"name": "x1 tracker",
"room": "garage",
"type": "device_tracker",
"id": {
"entity_id": "device_tracker.x1_xdrive25e",
"device_id": null
}
},
{
"name": "Device 2574b858b69f29422a37da5a8a6db887",
"room": null,
"type": "lock",
"id": {
"entity_id": "2574b858b69f29422a37da5a8a6db887",
"device_id": null
}
},
{
"name": "Device 4cad819e94c6b23041776358896b68a0",
"room": null,
"type": "lock",
"id": {
"entity_id": "4cad819e94c6b23041776358896b68a0",
"device_id": null
}
},
{
"name": "Device 73087b9e1e3a0ceb0fc6d4024bd9ffe1",
"room": null,
"type": "device_tracker",
"id": {
"entity_id": "73087b9e1e3a0ceb0fc6d4024bd9ffe1",
"device_id": null
}
},
{
"name": "Device d2b7376b62ba76e3cebf5d2479e76922",
"room": null,
"type": "lock",
"id": {
"entity_id": "d2b7376b62ba76e3cebf5d2479e76922",
"device_id": null
}
}
]
},
{
"id": "'1717786531178'",
"automation": "- id: '1717786531178'\n alias: '🛋️ Sala: Baixar Estores Sunset'\n description: Baixar os estores quando o sol se põe\n trigger:\n - platform: sun\n event: sunset\n offset: -00:15:00\n condition: []\n action:\n - if:\n - condition: state\n entity_id: group.alguem_em_casa\n state: home\n then:\n - service: cover.close_cover\n metadata: {}\n data: {}\n target:\n entity_id:\n - cover.estore_3_estore_3\n - service: light.turn_on\n metadata: {}\n data: {}\n target:\n entity_id: light.candeeiros_sala_inferior\n - delay:\n hours: 0\n minutes: 0\n seconds: 5\n milliseconds: 0\n - service: cover.close_cover\n metadata: {}\n data: {}\n target:\n entity_id: cover.estore_2_estore_2\n else:\n - service: cover.close_cover\n metadata: {}\n data: {}\n target:\n entity_id:\n - cover.estore_3_estore_3\n - delay:\n hours: 0\n minutes: 0\n seconds: 5\n milliseconds: 0\n - service: cover.close_cover\n metadata: {}\n data: {}\n target:\n entity_id: cover.estore_2_estore_2\n mode: single",
"config": [
{
"name": "store 3 store 3",
"room": "living room",
"type": "cover",
"id": {
"entity_id": "cover.estore_3_estore_3",
"device_id": null
}
},
{
"name": "living room lower lights",
"room": "living room",
"type": "light",
"id": {
"entity_id": "light.candeeiros_sala_inferior",
"device_id": null
}
},
{
"name": "store 2 store 2",
"room": "living room",
"type": "cover",
"id": {
"entity_id": "cover.estore_2_estore_2",
"device_id": null
}
},
{
"name": "someone at home group",
"room": "home",
"type": "group",
"id": {
"entity_id": "group.alguem_em_casa",
"device_id": null
}
}
]
},
{
"id": "'1717786542943'",
"automation": "- id: '1717786542943'\n alias: '🛋️ Sala: Subir estores manhã'\n description: Subir os estores quando as 07:45\n triggers:\n - at: 07:45:00\n trigger: time\n conditions: []\n actions:\n - action: cover.open_cover\n metadata: {}\n data: {}\n target:\n entity_id: cover.estores\n mode: single",
"config": [
{
"name": "stores",
"room": "living room",
"type": "cover",
"id": {
"entity_id": "cover.estores",
"device_id": null
}
}
]
},
{
"id": "'1717786571925'",
"automation": "- id: '1717786571925'\n alias: Smart Grid Auto on\n description: ''\n trigger:\n - platform: state\n entity_id:\n - sensor.template_coopernico_spot_price_bihorario\n condition: []\n action:\n - if:\n - condition: numeric_state\n entity_id: sensor.template_coopernico_spot_price_bihorario\n below: 76\n then:\n - type: turn_on\n device_id: fdb41e98b294e9204d61b1a6320f6c91\n entity_id: 812cfe69bc952bc3c627fef200856b27\n domain: switch\n else:\n - type: turn_off\n device_id: fdb41e98b294e9204d61b1a6320f6c91\n entity_id: 812cfe69bc952bc3c627fef200856b27\n domain: switch\n mode: single",
"config": [
{
"name": "coopernico spot price bihorario",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.template_coopernico_spot_price_bihorario",
"device_id": null
}
},
{
"name": "Device 812cfe69bc952bc3c627fef200856b27",
"room": null,
"type": "switch",
"id": {
"entity_id": "812cfe69bc952bc3c627fef200856b27",
"device_id": null
}
},
{
"name": "Device fdb41e98b294e9204d61b1a6320f6c91",
"room": null,
"type": "switch",
"id": {
"entity_id": "fdb41e98b294e9204d61b1a6320f6c91",
"device_id": null
}
}
]
},
{
"id": "'1717786590629'",
"automation": "- id: '1717786590629'\n alias: Status Portão\n description: Status do portão de casa, para resolver o flapping do sensor e o switch\n do shelly ter temporizador de 1 segundo.\n trigger:\n - platform: state\n entity_id:\n - switch.portao\n from: 'off'\n to: 'on'\n condition: []\n action:\n - service: input_boolean.turn_on\n target:\n entity_id: input_boolean.portao_status\n data: {}\n - delay:\n hours: 0\n minutes: 0\n seconds: 50\n milliseconds: 0\n - service: input_boolean.turn_off\n target:\n entity_id: input_boolean.portao_status\n data: {}\n mode: single",
"config": [
{
"name": "gate switch",
"room": "garage",
"type": "switch",
"id": {
"entity_id": "switch.portao",
"device_id": null
}
},
{
"name": "gate status",
"room": "garage",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.portao_status",
"device_id": null
}
}
]
},
{
"id": "'1717929670853'",
"automation": "- id: '1717929670853'\n alias: Automatic Backups\n description: ''\n trigger:\n - id: daily\n platform: time\n at: 01:00:00\n - id: hourly\n enabled: true\n platform: time_pattern\n hours: /12\n condition: []\n action:\n - if:\n - condition: trigger\n id: daily\n then:\n - choose:\n - conditions:\n - condition: template\n value_template: '{{ enable_yearly }}'\n - condition: template\n value_template: '{{ now().day == 1 and now().month == 1 }}'\n sequence:\n - variables:\n backup_type: yearly\n keep_days: 365\n - variables:\n name: \"{{ backup_type | title }}Backup: {{\\n now().strftime(\\n \\\"\\\n %A, \\\"\\n ~ iif(backup_type == \\\"hourly\\\", \\\"%-I:%M %p, \\\", \\\"\\\")\\n\\\n \\ ~ \\\"%B %-d, %Y\\\"\\n )\\n}}\\n{# HourlyBackup: Monday, 3:04 PM, January\\\n \\ 2, 2006 #}\\n{# DailyBackup: Monday, January 2, 2006 #}\\n\"\n backup_action:\n - service: auto_backup.backup\n data:\n name: '{{ name }}'\n password: '{{ password }}'\n keep_days: '{{ keep_days }}'\n include_folders:\n - config\n - if:\n - condition: template\n value_template: '{{ not use_action_hourly }}'\n - condition: template\n value_template: '{{ backup_action | length > 0 }}'\n then:\n - service: auto_backup.backup\n data:\n name: '{{ name }}'\n password: '{{ password }}'\n keep_days: '{{ keep_days }}'\n include_folders:\n - config\n else:\n - alias: Creating a full backup (default action)\n service: auto_backup.backup\n data:\n name: '{{ name }}'\n password: '{{ password }}'\n keep_days: '{{ keep_days }}'\n - conditions:\n - condition: template\n value_template: '{{ enable_monthly }}'\n - condition: template\n value_template: '{{ now().day == 1 }}'\n sequence:\n - variables:\n backup_type: monthly\n keep_days: 90\n - variables:\n name: \"{{ backup_type | title }}Backup: {{\\n now().strftime(\\n \\\"\\\n %A, \\\"\\n ~ iif(backup_type == \\\"hourly\\\", \\\"%-I:%M %p, \\\", \\\"\\\")\\n\\\n \\ ~ \\\"%B %-d, %Y\\\"\\n )\\n}}\\n{# HourlyBackup: Monday, 3:04 PM, January\\\n \\ 2, 2006 #}\\n{# DailyBackup: Monday, January 2, 2006 #}\\n\"\n backup_action:\n - service: auto_backup.backup\n data:\n name: '{{ name }}'\n password: '{{ password }}'\n keep_days: '{{ keep_days }}'\n include_folders:\n - config\n - if:\n - condition: template\n value_template: '{{ not use_action_hourly }}'\n - condition: template\n value_template: '{{ backup_action | length > 0 }}'\n then:\n - service: auto_backup.backup\n data:\n name: '{{ name }}'\n password: '{{ password }}'\n keep_days: '{{ keep_days }}'\n include_folders:\n - config\n else:\n - alias: Creating a full backup (default action)\n service: auto_backup.backup\n data:\n name: '{{ name }}'\n password: '{{ password }}'\n keep_days: '{{ keep_days }}'\n - conditions:\n - condition: template\n value_template: '{{ enable_weekly }}'\n - condition: template\n value_template: '{{ now().weekday() == 0 }}'\n sequence:\n - variables:\n backup_type: weekly\n keep_days: 30\n - variables:\n name: \"{{ backup_type | title }}Backup: {{\\n now().strftime(\\n \\\"\\\n %A, \\\"\\n ~ iif(backup_type == \\\"hourly\\\", \\\"%-I:%M %p, \\\", \\\"\\\")\\n\\\n \\ ~ \\\"%B %-d, %Y\\\"\\n )\\n}}\\n{# HourlyBackup: Monday, 3:04 PM, January\\\n \\ 2, 2006 #}\\n{# DailyBackup: Monday, January 2, 2006 #}\\n\"\n backup_action:\n - service: auto_backup.backup\n data:\n name: '{{ name }}'\n password: '{{ password }}'\n keep_days: '{{ keep_days }}'\n include_folders:\n - config\n - if:\n - condition: template\n value_template: '{{ not use_action_hourly }}'\n - condition: template\n value_template: '{{ backup_action | length > 0 }}'\n then:\n - service: auto_backup.backup\n data:\n name: '{{ name }}'\n password: '{{ password }}'\n keep_days: '{{ keep_days }}'\n include_folders:\n - config\n else:\n - alias: Creating a full backup (default action)\n service: auto_backup.backup\n data:\n name: '{{ name }}'\n password: '{{ password }}'\n keep_days: '{{ keep_days }}'\n - conditions:\n - condition: template\n value_template: '{{ enable_daily }}'\n sequence:\n - variables:\n backup_type: daily\n keep_days: 7\n - variables:\n name: \"{{ backup_type | title }}Backup: {{\\n now().strftime(\\n \\\"\\\n %A, \\\"\\n ~ iif(backup_type == \\\"hourly\\\", \\\"%-I:%M %p, \\\", \\\"\\\")\\n\\\n \\ ~ \\\"%B %-d, %Y\\\"\\n )\\n}}\\n{# HourlyBackup: Monday, 3:04 PM, January\\\n \\ 2, 2006 #}\\n{# DailyBackup: Monday, January 2, 2006 #}\\n\"\n backup_action:\n - service: auto_backup.backup\n data:\n name: '{{ name }}'\n password: '{{ password }}'\n keep_days: '{{ keep_days }}'\n include_folders:\n - config\n - if:\n - condition: template\n value_template: '{{ not use_action_hourly }}'\n - condition: template\n value_template: '{{ backup_action | length > 0 }}'\n then:\n - service: auto_backup.backup\n data:\n name: '{{ name }}'\n password: '{{ password }}'\n keep_days: '{{ keep_days }}'\n include_folders:\n - config\n else:\n - alias: Creating a full backup (default action)\n service: auto_backup.backup\n data:\n name: '{{ name }}'\n password: '{{ password }}'\n keep_days: '{{ keep_days }}'\n else:\n - variables:\n backup_type: hourly\n keep_days: 1\n - variables:\n name: \"{{ backup_type | title }}Backup: {{\\n now().strftime(\\n \\\"%A, \\\"\\\n \\n ~ iif(backup_type == \\\"hourly\\\", \\\"%-I:%M %p, \\\", \\\"\\\")\\n ~ \\\"\\\n %B %-d, %Y\\\"\\n )\\n}}\\n{# HourlyBackup: Monday, 3:04 PM, January 2, 2006\\\n \\ #}\\n{# DailyBackup: Monday, January 2, 2006 #}\\n\"\n backup_action:\n - service: auto_backup.backup\n data:\n name: '{{ name }}'\n password: '{{ password }}'\n keep_days: '{{ keep_days }}'\n include_folders:\n - config\n - if:\n - condition: template\n value_template: '{{ backup_action | length > 0 }}'\n then:\n - service: auto_backup.backup\n data:\n name: '{{ name }}'\n password: '{{ password }}'\n keep_days: '{{ keep_days }}'\n include_folders:\n - config\n else:\n - alias: Creating a partial backup (default action)\n service: auto_backup.backup\n data:\n name: '{{ name }}'\n password: '{{ password }}'\n keep_days: '{{ keep_days }}'\n include_folders:\n - config\n mode: single\n variables:\n password: ''\n enable_hourly: true\n enable_daily: true\n enable_weekly: true\n enable_monthly: false\n enable_yearly: false\n use_action_hourly: true",
"config": []
},
{
"id": "'1718129262036'",
"automation": "- id: '1718129262036'\n alias: 🏊🏻Bomba Piscina Dia\n description: ''\n use_blueprint:\n path: PVExcessControl/pv_excess_control.yaml\n input:\n automation_id: automation.new_automation_3\n grid_voltage: 230\n pv_power: sensor.emoncms_solar\n export_power: sensor.emoncms_export_power_positive\n load_power: sensor.emoncms_use\n actual_power: sensor.bomba_piscina_switch_0_power\n power_toggle_margin: 10\n appliance_switch: switch.bomba_piscina_switch_0\n inverter_limit: 0",
"config": [
{
"name": "pool pump",
"room": "pool",
"type": "switch",
"id": {
"entity_id": "switch.bomba_piscina",
"device_id": null
}
},
{
"name": "pool pump switch 0",
"room": "pool",
"type": "switch",
"id": {
"entity_id": "switch.bomba_piscina_switch_0",
"device_id": null
}
},
{
"name": "new automation 3",
"room": null,
"type": "automation",
"id": {
"entity_id": "automation.new_automation_3",
"device_id": null
}
},
{
"name": "emoncms solar",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.emoncms_solar",
"device_id": null
}
},
{
"name": "emoncms export power positive",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.emoncms_export_power_positive",
"device_id": null
}
},
{
"name": "emoncms use",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.emoncms_use",
"device_id": null
}
},
{
"name": "pool pump switch 0 power",
"room": "pool",
"type": "sensor",
"id": {
"entity_id": "sensor.bomba_piscina_switch_0_power",
"device_id": null
}
}
]
},
{
"id": "'1718180786151'",
"automation": "- id: '1718180786151'\n alias: 💡Luz Corredor auto\n description: ''\n use_blueprint:\n path: Blackshome/sensor-light.yaml\n input:\n motion_trigger:\n - binary_sensor.bthome_sensor_9179_motion\n - binary_sensor.corredor_superior_corredor_superior_motion_alarm\n light_switch:\n entity_id:\n - light.shellyplus2pm_c82e180d5f10_switch_1\n include_sun: sun_enabled\n ambient_light_sensor: sensor.shelly_b_0114_illuminance\n include_ambient: ambient_enabled",
"config": [
{
"name": "bthome sensor 9179 motion",
"room": "corridor",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.bthome_sensor_9179_motion",
"device_id": null
}
},
{
"name": "upper corridor motion",
"room": "corridor",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.corredor_superior_corredor_superior_motion_alarm",
"device_id": null
}
},
{
"name": "corridor light switch",
"room": "corridor",
"type": "light",
"id": {
"entity_id": "light.shellyplus2pm_c82e180d5f10_switch_1",
"device_id": null
}
},
{
"name": "shelly b 0114 illuminance",
"room": "exterior",
"type": "sensor",
"id": {
"entity_id": "sensor.shelly_b_0114_illuminance",
"device_id": null
}
}
]
},
{
"id": "'1718181298382'",
"automation": "- id: '1718181298382'\n alias: 💡Luz Exterior Auto\n description: ''\n use_blueprint:\n path: Blackshome/sensor-light.yaml\n input:\n motion_trigger:\n - binary_sensor.shelly_b_0114_window\n light_switch:\n entity_id: light.exterior\n time_delay: 10\n include_sun: sun_enabled\n night_lights_conditions: []",
"config": [
{
"name": "exterior light",
"room": "exterior",
"type": "light",
"id": {
"entity_id": "light.exterior",
"device_id": null
}
},
{
"name": "shelly b 0114 window",
"room": "exterior",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.shelly_b_0114_window",
"device_id": null
}
}
]
},
{
"id": "'1718533356578'",
"automation": "- id: '1718533356578'\n alias: Update Coopernico Prices\n description: ''\n trigger:\n - platform: time_pattern\n minutes: /5\n condition: []\n action:\n - service: homeassistant.update_entity\n data: {}\n target:\n entity_id: sensor.coopernico_prices\n - service: homeassistant.update_entity\n data: {}\n target:\n entity_id: sensor.coopernico_injection\n mode: single",
"config": [
{
"name": "coopernico prices",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.coopernico_prices",
"device_id": null
}
},
{
"name": "coopernico injection",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.coopernico_injection",
"device_id": null
}
}
]
},
{
"id": "'1718718997708'",
"automation": "- id: '1718718997708'\n alias: Solcast update\n description: ''\n trigger:\n - platform: template\n value_template: \"{% set nr = as_datetime(state_attr('sun.sun','next_rising'))\\\n \\ | as_local %} {% set ns = as_datetime(state_attr('sun.sun','next_setting'))\\\n \\ | as_local %} {% set api_request_limit = 10 %} {% if nr > ns %}\\n {% set\\\n \\ nr = nr - timedelta(hours = 24) %} \\n{% endif %} {% set hours_difference =\\\n \\ (ns - nr) %} {% set interval_hours = hours_difference / api_request_limit\\\n \\ %} {% set ns = namespace(match = false) %} {% for i in range(api_request_limit)\\\n \\ %}\\n {% set start_time = nr + (i * interval_hours) %}\\n {% if ((start_time\\\n \\ - timedelta(seconds=30)) <= now()) and (now() <= (start_time + timedelta(seconds=30)))\\\n \\ %}\\n {% set ns.match = true %}\\n {% endif %}\\n{% endfor %} {{ ns.match\\\n \\ }}\"\n condition:\n - condition: sun\n before: sunset\n after: sunrise\n action:\n - delay:\n seconds: '{{ range(30, 360)|random|int }}'\n - service: solcast_solar.update_forecasts\n data: {}\n mode: single",
"config": [
{
"name": "sun sun",
"room": null,
"type": "sun",
"id": {
"entity_id": "sun.sun",
"device_id": null
}
}
]
},
{
"id": "'1718905487958'",
"automation": "- id: '1718905487958'\n alias: 💡Luz Escadas Superior Auto\n description: ''\n use_blueprint:\n path: Blackshome/sensor-light.yaml\n input:\n light_switch:\n entity_id: light.luzes_sala_superior_channel_1\n motion_trigger:\n - binary_sensor.motion_sensor_z_wave_plus_motion_sensor_z_wave_plus_motion_alarm\n include_sun: sun_enabled\n include_ambient: ambient_disabled\n ambient_light_sensor: sensor.motion_sensor_z_wave_plus_motion_sensor_z_wave_plus_luminance\n ambient_light_options: ambient_light_option_enabled",
"config": [
{
"name": "living room upper light channel 1",
"room": "living room",
"type": "light",
"id": {
"entity_id": "light.luzes_sala_superior_channel_1",
"device_id": null
}
},
{
"name": "zwave motion sensor",
"room": "stairs",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.motion_sensor_z_wave_plus_motion_sensor_z_wave_plus_motion_alarm",
"device_id": null
}
},
{
"name": "zwave motion sensor luminance",
"room": "stairs",
"type": "sensor",
"id": {
"entity_id": "sensor.motion_sensor_z_wave_plus_motion_sensor_z_wave_plus_luminance",
"device_id": null
}
}
]
},
{
"id": "'1728665169529'",
"automation": "- id: '1728665169529'\n alias: 🔋UPS - Notification\n description: ''\n triggers:\n - entity_id:\n - sensor.mclima_ups_informacao_do_estado\n - sensor.net_ups_informacao_do_estado\n id: battery\n trigger: state\n for:\n hours: 0\n minutes: 1\n seconds: 0\n to: OB DISCHRG\n - entity_id:\n - sensor.mclima_ups_informacao_do_estado\n - sensor.net_ups_informacao_do_estado\n to: OL CHRG\n id: online\n trigger: state\n - entity_id:\n - sensor.mclima_ups_informacao_do_estado\n - sensor.net_ups_informacao_do_estado\n id: replace_battery\n trigger: state\n for:\n hours: 0\n minutes: 5\n seconds: 0\n to: ALARM OL RB\n - entity_id:\n - sensor.mclima_ups_informacao_do_estado\n - sensor.net_ups_informacao_do_estado\n id: replace_battery\n trigger: state\n for:\n hours: 0\n minutes: 5\n seconds: 0\n to: ALARM OL CHRH RB\n conditions: []\n actions:\n - choose:\n - conditions:\n - condition: trigger\n id: battery\n sequence:\n - action: notify.mobile_app_glphone\n data:\n message: A UPS está em modo de bateria!!! 🔋\n title: 🚨Energia\n data:\n push:\n interruption-level: time-sensitive\n sound:\n name: default\n critical: 1\n volume: 1\n - conditions:\n - condition: trigger\n id: online\n sequence:\n - action: notify.mobile_app_glphone\n data:\n message: A UPS já está online.🔋⚡\n title: ✅Energia\n - conditions:\n - condition: trigger\n id:\n - replace_battery\n sequence:\n - action: notify.mobile_app_glphone\n data:\n title: ❗Trocar baterias na UPS.❗\n message: As baterias da UPS têm de ser substituías.\n mode: single",
"config": [
{
"name": "glphone notify",
"room": null,
"type": "notify",
"id": {
"entity_id": "notify.mobile_app_glphone",
"device_id": null
}
},
{
"name": "mclima ups state info",
"room": "office",
"type": "sensor",
"id": {
"entity_id": "sensor.mclima_ups_informacao_do_estado",
"device_id": null
}
},
{
"name": "net ups state info",
"room": "network",
"type": "sensor",
"id": {
"entity_id": "sensor.net_ups_informacao_do_estado",
"device_id": null
}
}
]
},
{
"id": "'1728983716594'",
"automation": "- id: '1728983716594'\n alias: Ventilador Cave Solar\n description: ''\n use_blueprint:\n path: PVExcessControl/pv_excess_control.yaml\n input:\n automation_id: automation.ventilador_cave\n appliance_priority: 2\n pv_power: sensor.emoncms_solar\n export_power: sensor.emoncms_export_power_positive\n load_power: sensor.emoncms_use\n appliance_switch: switch.ventilador_cave_switch\n appliance_switch_interval: 2\n actual_power: sensor.ventilador_cave_switch_0_power\n defined_current: 0.2",
"config": [
{
"name": "emoncms solar",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.emoncms_solar",
"device_id": null
}
},
{
"name": "emoncms export power positive",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.emoncms_export_power_positive",
"device_id": null
}
},
{
"name": "emoncms use",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.emoncms_use",
"device_id": null
}
},
{
"name": "basement fan switch",
"room": "basement",
"type": "switch",
"id": {
"entity_id": "switch.ventilador_cave_switch",
"device_id": null
}
},
{
"name": "basement fan switch 0 power",
"room": "basement",
"type": "sensor",
"id": {
"entity_id": "sensor.ventilador_cave_switch_0_power",
"device_id": null
}
}
]
},
{
"id": "'1730368547136'",
"automation": "- id: '1730368547136'\n alias: ♨️ Bomba de Calor Power MQTT Publish\n description: ''\n triggers:\n - trigger: time_pattern\n seconds: /10\n enabled: true\n conditions: []\n actions:\n - action: mqtt.publish\n metadata: {}\n data:\n evaluate_payload: false\n qos: '2'\n topic: homeassistant/sensor/heating\n payload: '\"{{ states(''sensor.hpsu_can_heating_emoncms'') }}\"'\n - action: mqtt.publish\n metadata: {}\n data:\n qos: '2'\n topic: homeassistant/sensor/dhw\n payload: '\"{{ states(''sensor.hpsu_can_dhw_emoncms'') }}\"'\n - action: mqtt.publish\n metadata: {}\n data:\n evaluate_payload: false\n qos: '2'\n topic: homeassistant/sensor/t_outside\n payload: '\"{{ states(''sensor.hpsu_can_outside_temperature'') }}\"'\n - action: mqtt.publish\n metadata: {}\n data:\n evaluate_payload: false\n qos: '2'\n topic: homeassistant/sensor/target_room_temp\n payload: '\"{{ states(''sensor.hspu_can_target_room_emoncms'') }}\"'\n - action: mqtt.publish\n metadata: {}\n data:\n evaluate_payload: false\n qos: '2'\n topic: homeassistant/sensor/bomba_de_calor_flow_rate\n payload: '\"{{ states(''sensor.hpsu_can_flow_rate'') }}\"'\n - action: mqtt.publish\n metadata: {}\n data:\n evaluate_payload: false\n qos: '2'\n topic: homeassistant/sensor/thermal_power\n payload: '\"{{ states(''sensor.hpsu_can_thermal_power_2'') }}\"'\n - action: mqtt.publish\n metadata: {}\n data:\n evaluate_payload: false\n qos: '2'\n topic: homeassistant/sensor/flow_temperature_tv\n payload: '\"{{ states(''sensor.hpsu_can_flow_temperature_tv'') }}\"'\n - action: mqtt.publish\n metadata: {}\n data:\n evaluate_payload: false\n qos: '2'\n topic: homeassistant/sensor/flow_return_temperature_heating\n payload: '\"{{ states(''sensor.hpsu_can_return_temperature_heating'') }}\"'\n mode: single",
"config": [
{
"name": "heat pump heating emoncms",
"room": "heating",
"type": "sensor",
"id": {
"entity_id": "sensor.hpsu_can_heating_emoncms",
"device_id": null
}
},
{
"name": "heat pump dhw emoncms",
"room": "heating",
"type": "sensor",
"id": {
"entity_id": "sensor.hpsu_can_dhw_emoncms",
"device_id": null
}
},
{
"name": "outside temperature",
"room": "exterior",
"type": "sensor",
"id": {
"entity_id": "sensor.hpsu_can_outside_temperature",
"device_id": null
}
},
{
"name": "target room temp",
"room": "living room",
"type": "sensor",
"id": {
"entity_id": "sensor.hspu_can_target_room_emoncms",
"device_id": null
}
},
{
"name": "heat pump flow rate",
"room": "heating",
"type": "sensor",
"id": {
"entity_id": "sensor.hpsu_can_flow_rate",
"device_id": null
}
},
{
"name": "thermal power",
"room": "heating",
"type": "sensor",
"id": {
"entity_id": "sensor.hpsu_can_thermal_power_2",
"device_id": null
}
},
{
"name": "flow temperature tv",
"room": "heating",
"type": "sensor",
"id": {
"entity_id": "sensor.hpsu_can_flow_temperature_tv",
"device_id": null
}
},
{
"name": "return temperature heating",
"room": "heating",
"type": "sensor",
"id": {
"entity_id": "sensor.hpsu_can_return_temperature_heating",
"device_id": null
}
}
]
},
{
"id": "'1732289985472'",
"automation": "- id: '1732289985472'\n alias: MQTT Publish\n description: ''\n triggers:\n - trigger: state\n entity_id:\n - sensor.bmw_x1_charging_w_2\n id: '1'\n - trigger: state\n entity_id:\n - sensor.bmw_i4_charging_w\n id: '2'\n conditions: []\n actions:\n - if:\n - condition: trigger\n id:\n - '1'\n then:\n - action: mqtt.publish\n metadata: {}\n data:\n evaluate_payload: false\n qos: '2'\n topic: homeassistant/sensor/ev/bmwx1_charging_w\n payload: '\"{{ states(''sensor.bmw_x1_charging_w_2'') | float(0) | round(0)\n }}\"'\n - if:\n - condition: trigger\n id:\n - '2'\n then:\n - action: mqtt.publish\n metadata: {}\n data:\n evaluate_payload: false\n qos: '2'\n topic: homeassistant/sensor/ev/bmwi4_charging_w\n payload: '\"{{ states(''sensor.bmw_i4_charging_w'') | float(0) | round(0) }}\"'\n mode: single",
"config": [
{
"name": "bmw x1 charging w 2",
"room": "garage",
"type": "sensor",
"id": {
"entity_id": "sensor.bmw_x1_charging_w_2",
"device_id": null
}
},
{
"name": "bmw i4 charging w",
"room": "garage",
"type": "sensor",
"id": {
"entity_id": "sensor.bmw_i4_charging_w",
"device_id": null
}
}
]
},
{
"id": "'1742729233913'",
"automation": "- id: '1742729233913'\n alias: 'Telegram Bot: Conversation with Assist'\n description: ''\n use_blueprint:\n path: marc-romu/telegram-bot--conversation.yaml\n input:\n conversation_agent: conversation.chatgpt",
"config": [
{
"name": "chatgpt conversation",
"room": null,
"type": "conversation",
"id": {
"entity_id": "conversation.chatgpt",
"device_id": null
}
}
]
},
{
"id": "'1742733934795'",
"automation": "- id: '1742733934795'\n alias: 'OpenAI Daily: Environmental Notification'\n description: ''\n triggers:\n - at: 08:05:00\n trigger: time\n - at: '12:40:00'\n trigger: time\n - at: '18:30:00'\n trigger: time\n conditions: []\n actions:\n - alias: 'Call a service ''Weather: Get Forecast'''\n action: weather.get_forecasts\n target:\n entity_id: weather.forecast_home\n data:\n type: daily\n response_variable: daily_forecast\n - data:\n agent_id: conversation.chatgpt\n text: '\"Para esta tarefa, es um consultor meteorológico e es responsavel por\n garantir a qualidade do ar no interior da casa. Please provide your thoughts\n on our indoor air quality as it relates to the weather outside and our current\n heating / cooling system settings. Podes e deves usar um tom humorista. Podes\n usar emojis. Responde em portugues de portugal sem gerúndio. \\_ Current time\n {{now()}} Current thermostat setting {{states(''select.hpsu_can_target_room_1_temperature'')}}\n Current Home temperature {{states(''sensor.emoncms_home_temperature'')}} °C\n Current Home average temperature is {{states(''sensor.casa_temperatura_media'')}}\n °C Current Home average humidity is {{states(''sensor.casa_humidade_media_relativa'')}}\n % Exterior Weather Data Temperature is {{ states(''sensor.bthome_sensor_6a2b_temperature'')\n }} °C Exterior Feels like temperature is {{ states(''sensor.home_temperatura_aparente'')\n }} °C Exterior Weather Data Humidity is {{ states(''sensor.bthome_sensor_6a2b_humidity'')\n }} % Current Rain Intensity {{ states(''sensor.home_precipitacao'') }} mm/h\n Forecasted Conditions for Today {{states(''sensor.home_condicao_dia_0'')}}\n Forecasted High Tempterature for Today {{states(''sensor.home_temperatura_max_realfeel_dia_0'')}}\n °C Forecasted Low Temperature for Today {{states(''sensor.home_temperatura_min_realfeel_dia_0'')}}\n °C'\n language: pt-pt\n enabled: true\n response_variable: agent\n action: conversation.process\n - action: telegram_bot.send_message\n metadata: {}\n data:\n title: Qualidade do Ar em Casa\n message: '{{agent.response.speech.plain.speech}}'\n mode: single",
"config": [
{
"name": "telegram bot",
"room": null,
"type": "telegram_bot",
"id": {
"entity_id": "telegram_bot.send_message",
"device_id": null
}
},
{
"name": "chatgpt conversation",
"room": null,
"type": "conversation",
"id": {
"entity_id": "conversation.chatgpt",
"device_id": null
}
},
{
"name": "forecast home weather",
"room": "home",
"type": "weather",
"id": {
"entity_id": "weather.forecast_home",
"device_id": null
}
},
{
"name": "target room 1 temperature",
"room": "living room",
"type": "select",
"id": {
"entity_id": "select.hpsu_can_target_room_1_temperature",
"device_id": null
}
},
{
"name": "home temperature",
"room": "home",
"type": "sensor",
"id": {
"entity_id": "sensor.emoncms_home_temperature",
"device_id": null
}
},
{
"name": "home average temperature",
"room": "home",
"type": "sensor",
"id": {
"entity_id": "sensor.casa_temperatura_media",
"device_id": null
}
},
{
"name": "home average relative humidity",
"room": "home",
"type": "sensor",
"id": {
"entity_id": "sensor.casa_humidade_media_relativa",
"device_id": null
}
},
{
"name": "bthome sensor 6a2b temperature",
"room": "exterior",
"type": "sensor",
"id": {
"entity_id": "sensor.bthome_sensor_6a2b_temperature",
"device_id": null
}
},
{
"name": "home apparent temperature",
"room": "home",
"type": "sensor",
"id": {
"entity_id": "sensor.home_temperatura_aparente",
"device_id": null
}
},
{
"name": "bthome sensor 6a2b humidity",
"room": "exterior",
"type": "sensor",
"id": {
"entity_id": "sensor.bthome_sensor_6a2b_humidity",
"device_id": null
}
},
{
"name": "home precipitation",
"room": "exterior",
"type": "sensor",
"id": {
"entity_id": "sensor.home_precipitacao",
"device_id": null
}
},
{
"name": "home condition day 0",
"room": "home",
"type": "sensor",
"id": {
"entity_id": "sensor.home_condicao_dia_0",
"device_id": null
}
},
{
"name": "home max realfeel temp day 0",
"room": "home",
"type": "sensor",
"id": {
"entity_id": "sensor.home_temperatura_max_realfeel_dia_0",
"device_id": null
}
},
{
"name": "home min realfeel temp day 0",
"room": "home",
"type": "sensor",
"id": {
"entity_id": "sensor.home_temperatura_min_realfeel_dia_0",
"device_id": null
}
},
{
"name": "forecast weather",
"room": null,
"type": "weather",
"id": {
"entity_id": "weather.forecast",
"device_id": null
}
}
]
},
{
"id": "'1744301274357'",
"automation": "- id: '1744301274357'\n alias: 🏊🏻 Automação Bomba Piscina\n description: ''\n triggers:\n - trigger: numeric_state\n entity_id:\n - sensor.potencia_emonpi_import_export_media_5_minutos\n below: -750\n id: 'ON'\n - trigger: numeric_state\n entity_id:\n - sensor.potencia_emonpi_import_export_media_5_minutos\n id: 'OFF'\n above: 750\n conditions:\n - condition: sun\n after: sunrise\n before: sunset\n actions:\n - if:\n - condition: trigger\n id:\n - 'ON'\n then:\n - type: turn_on\n device_id: e5f1b9b1d10308b32ef8f69bc0d20d74\n entity_id: 43f5cd2f7257fed3e55788df58ce96de\n domain: switch\n - type: turn_on\n device_id: 1cb87651e79e117ef2610fc7e5c6a170\n entity_id: d1b3ca4d6a019622064ef94336bbd650\n domain: switch\n - if:\n - condition: trigger\n id:\n - 'OFF'\n then:\n - type: turn_off\n device_id: e5f1b9b1d10308b32ef8f69bc0d20d74\n entity_id: 43f5cd2f7257fed3e55788df58ce96de\n domain: switch\n - type: turn_off\n device_id: 1cb87651e79e117ef2610fc7e5c6a170\n entity_id: d1b3ca4d6a019622064ef94336bbd650\n domain: switch\n mode: single",
"config": [
{
"name": "emonpi import export average 5 minutes",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.potencia_emonpi_import_export_media_5_minutos",
"device_id": null
}
},
{
"name": "Device 1cb87651e79e117ef2610fc7e5c6a170",
"room": null,
"type": "switch",
"id": {
"entity_id": "1cb87651e79e117ef2610fc7e5c6a170",
"device_id": null
}
},
{
"name": "Device 43f5cd2f7257fed3e55788df58ce96de",
"room": "Pool",
"type": "switch",
"id": {
"entity_id": "43f5cd2f7257fed3e55788df58ce96de",
"device_id": null
}
},
{
"name": "Device d1b3ca4d6a019622064ef94336bbd650",
"room": null,
"type": "switch",
"id": {
"entity_id": "d1b3ca4d6a019622064ef94336bbd650",
"device_id": null
}
},
{
"name": "Device e5f1b9b1d10308b32ef8f69bc0d20d74",
"room": "Pool",
"type": "switch",
"id": {
"entity_id": "e5f1b9b1d10308b32ef8f69bc0d20d74",
"device_id": null
}
}
]
},
{
"id": "'1744308459186'",
"automation": "- id: '1744308459186'\n alias: 🏊🏻 Bomba piscina botão\n description: ''\n triggers:\n - device_id: e6ae30b2d7855ae2d2b83b4497674bfb\n domain: bthome\n type: button\n subtype: press\n trigger: device\n conditions: []\n actions:\n - type: toggle\n device_id: e5f1b9b1d10308b32ef8f69bc0d20d74\n entity_id: 43f5cd2f7257fed3e55788df58ce96de\n domain: switch\n mode: single",
"config": [
{
"name": "Device 43f5cd2f7257fed3e55788df58ce96de",
"room": "Pool",
"type": "switch",
"id": {
"entity_id": "43f5cd2f7257fed3e55788df58ce96de",
"device_id": null
}
},
{
"name": "Device e5f1b9b1d10308b32ef8f69bc0d20d74",
"room": "Pool",
"type": "switch",
"id": {
"entity_id": "e5f1b9b1d10308b32ef8f69bc0d20d74",
"device_id": null
}
},
{
"name": "Device e6ae30b2d7855ae2d2b83b4497674bfb",
"room": "Pool",
"type": "button",
"id": {
"entity_id": "e6ae30b2d7855ae2d2b83b4497674bfb",
"device_id": null
}
}
]
},
{
"id": "'1744915008704'",
"automation": "- id: '1744915008704'\n alias: 'OpenAI Daily: Piscina'\n description: ''\n triggers:\n - at: '20:30:00'\n trigger: time\n conditions: []\n actions:\n - data:\n agent_id: conversation.chatgpt\n text: Para esta tarefa, es um consultor de piscinas e queres garantir sempre\n que a piscina está limpa e pronta a usar. Mostra quando vai ser iniciada a\n filtragem da noite. Calcula se a horas de filtragem são suficientes, usa os\n dados que são enviados. Podes e deves usar um tom humorista. Podes usar emojis.\n Responde em portugues de portugal sem gerúndio. \\_ Current time {{now()}}\n tempo que a bomba da piscina esteve a trabalhar em {{states('sensor.duracao_filtragem_piscina_diario')}}\n tempo que o aquecimento da piscina esteve a funcionar {{states('sensor.duracao_aquecimento_piscina_diario')}} temperatura\n da piscina {{states('sensor.bomba_piscina_temperature')}} tempo que falta\n filtrar a piscina {{states('sensor.pool_pump_remaining_time')}} horario que\n vai ser iniciada a filtragem de noite {{states('sensor.bomba_piscina_noite_horario')}} Quantidade\n maxima em minutos que a piscina filtra por dia, tranforma em horas {{states('input_number.pool_pump_duration_lower_threshold')}} Energia\n gasta pela bomba da piscina {{states('sensor.energia_emonpi_piscina_use_total_kwhd')}}\n A bomba da piscina tem uma potencia de 1,5 CV. o volume da piscina é de 66\n metros cubicos. calcula se a tempo de filtragem foi suficiente.\n language: pt-pt\n enabled: true\n response_variable: agent\n action: conversation.process\n - action: telegram_bot.send_message\n metadata: {}\n data:\n title: Piscina\n message: '{{agent.response.speech.plain.speech}}'\n mode: single",
"config": [
{
"name": "pool pump duration lower threshold",
"room": "pool",
"type": "input_number",
"id": {
"entity_id": "input_number.pool_pump_duration_lower_threshold",
"device_id": null
}
},
{
"name": "telegram bot",
"room": null,
"type": "telegram_bot",
"id": {
"entity_id": "telegram_bot.send_message",
"device_id": null
}
},
{
"name": "chatgpt conversation",
"room": null,
"type": "conversation",
"id": {
"entity_id": "conversation.chatgpt",
"device_id": null
}
},
{
"name": "pool daily filtration",
"room": "pool",
"type": "sensor",
"id": {
"entity_id": "sensor.duracao_filtragem_piscina_diario",
"device_id": null
}
},
{
"name": "pool daily heating",
"room": "pool",
"type": "sensor",
"id": {
"entity_id": "sensor.duracao_aquecimento_piscina_diario",
"device_id": null
}
},
{
"name": "pool pump temperature",
"room": "pool",
"type": "sensor",
"id": {
"entity_id": "sensor.bomba_piscina_temperature",
"device_id": null
}
},
{
"name": "pool pump remaining time",
"room": "pool",
"type": "sensor",
"id": {
"entity_id": "sensor.pool_pump_remaining_time",
"device_id": null
}
},
{
"name": "pool pump night schedule",
"room": "pool",
"type": "sensor",
"id": {
"entity_id": "sensor.bomba_piscina_noite_horario",
"device_id": null
}
},
{
"name": "energy pool use total kwhd",
"room": "pool",
"type": "sensor",
"id": {
"entity_id": "sensor.energia_emonpi_piscina_use_total_kwhd",
"device_id": null
}
}
]
},
{
"id": "'1744969812713'",
"automation": "- id: '1744969812713'\n alias: Pool Pump Solar Optimizationsdsdsd\n description: Gerencia a bomba da piscina priorizando energia solar e garantindo\n filtragem diária\n triggers:\n - minutes: /15\n trigger: time_pattern\n - entity_id: sensor.solar_power\n trigger: state\n - at: 08:00:00\n trigger: time\n - at: '22:00:00'\n trigger: time\n conditions:\n - condition: template\n value_template: '{{ not is_state(''binary_sensor.pool_pump_malfunction'', ''on'')\n }}\n\n '\n actions:\n - target:\n entity_id: sensor.pool_pump_daily_runtime\n action: homeassistant.update_entity\n - choose:\n - conditions:\n - condition: time\n after: 08:00:00\n before: '22:00:00'\n - condition: template\n value_template: '{{ states(''sensor.solar_power'')|float > min_solar_power\n }}\n\n '\n sequence:\n - target:\n entity_id: switch.pool_pump\n action: switch.turn_on\n - target:\n entity_id: input_number.pool_pump_priority\n data:\n value: 1\n action: input_number.set\n - conditions:\n - condition: time\n after: '22:00:00'\n before: 08:00:00\n - condition: template\n value_template: '{% set daily_runtime = states(''sensor.pool_pump_daily_runtime'')|float\n %} {% set tomorrow_forecast = states(''sensor.tomorrow_solar_forecast'')|float\n %} {{ daily_runtime < min_daily_hours and tomorrow_forecast < 0.7 }}\n\n '\n sequence:\n - target:\n entity_id: switch.pool_pump\n action: switch.turn_on\n - target:\n entity_id: input_number.pool_pump_priority\n data:\n value: 2\n action: input_number.set\n default:\n - target:\n entity_id: switch.pool_pump\n action: switch.turn_off\n variables:\n min_daily_hours: 5\n min_solar_power: 1000\n pump_power: 800\n mode: restart",
"config": [
{
"name": "pool pump malfunction",
"room": "pool",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.pool_pump_malfunction",
"device_id": null
}
},
{
"name": "pool pump daily runtime",
"room": "pool",
"type": "sensor",
"id": {
"entity_id": "sensor.pool_pump_daily_runtime",
"device_id": null
}
},
{
"name": "solar power",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.solar_power",
"device_id": null
}
},
{
"name": "pool pump",
"room": "pool",
"type": "switch",
"id": {
"entity_id": "switch.pool_pump",
"device_id": null
}
},
{
"name": "pool pump priority",
"room": "pool",
"type": "input_number",
"id": {
"entity_id": "input_number.pool_pump_priority",
"device_id": null
}
},
{
"name": "tomorrow solar forecast",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.tomorrow_solar_forecast",
"device_id": null
}
}
]
},
{
"id": "'1745084857676'",
"automation": "- id: '1745084857676'\n alias: 💡Candeeiros Ligar/Desligar\n description: ''\n triggers:\n - device_id: e8a6c706997d87b98183e26e7598ae8b\n domain: shelly\n type: single\n subtype: button\n trigger: device\n - device_id: d686deeba13232cfa6ab008fa8c80dc0\n domain: bthome\n type: button_1\n subtype: press\n trigger: device\n conditions: []\n actions:\n - action: light.toggle\n metadata: {}\n data: {}\n target:\n entity_id: light.candeeiros_sala_inferior\n mode: single",
"config": [
{
"name": "living room lower lights",
"room": "living room",
"type": "light",
"id": {
"entity_id": "light.candeeiros_sala_inferior",
"device_id": null
}
},
{
"name": "Device d686deeba13232cfa6ab008fa8c80dc0",
"room": "Living Room",
"type": "button",
"id": {
"entity_id": "d686deeba13232cfa6ab008fa8c80dc0",
"device_id": null
}
},
{
"name": "Device e8a6c706997d87b98183e26e7598ae8b",
"room": "Living Room",
"type": "button",
"id": {
"entity_id": "e8a6c706997d87b98183e26e7598ae8b",
"device_id": null
}
}
]
},
{
"id": "'1745085627460'",
"automation": "- id: '1745085627460'\n alias: 🏡Botão Sala Portão\n description: ''\n triggers:\n - device_id: e8a6c706997d87b98183e26e7598ae8b\n domain: shelly\n type: triple\n subtype: button\n trigger: device\n - device_id: d686deeba13232cfa6ab008fa8c80dc0\n domain: bthome\n type: button_2\n subtype: long_press\n trigger: device\n conditions: []\n actions:\n - type: toggle\n device_id: c943a1b7851c56da555470902baf07a1\n entity_id: 9e3a402090766bb2d314909658c4ee90\n domain: switch\n mode: single",
"config": [
{
"name": "Device 9e3a402090766bb2d314909658c4ee90",
"room": "Gate",
"type": "switch",
"id": {
"entity_id": "9e3a402090766bb2d314909658c4ee90",
"device_id": null
}
},
{
"name": "Device c943a1b7851c56da555470902baf07a1",
"room": "Gate",
"type": "switch",
"id": {
"entity_id": "c943a1b7851c56da555470902baf07a1",
"device_id": null
}
},
{
"name": "Device d686deeba13232cfa6ab008fa8c80dc0",
"room": "Living Room",
"type": "button",
"id": {
"entity_id": "d686deeba13232cfa6ab008fa8c80dc0",
"device_id": null
}
},
{
"name": "Device e8a6c706997d87b98183e26e7598ae8b",
"room": "Living Room",
"type": "button",
"id": {
"entity_id": "e8a6c706997d87b98183e26e7598ae8b",
"device_id": null
}
}
]
},
{
"id": "'1745085892451'",
"automation": "- id: '1745085892451'\n alias: 'Desligar tudo Sala '\n description: ''\n triggers:\n - device_id: e8a6c706997d87b98183e26e7598ae8b\n domain: shelly\n type: long\n subtype: button\n trigger: device\n - device_id: d686deeba13232cfa6ab008fa8c80dc0\n domain: bthome\n type: button_1\n subtype: long_press\n trigger: device\n conditions: []\n actions:\n - action: light.turn_off\n metadata: {}\n data: {}\n target:\n entity_id:\n - light.sala_inferior\n - action: media_player.turn_off\n metadata: {}\n data: {}\n target:\n device_id: a5dd3a6582b27b004323486771a64137\n - action: light.turn_on\n metadata: {}\n data: {}\n target:\n entity_id: light.shellyplus2pm_c82e180d5f10_switch_1\n - delay:\n hours: 0\n minutes: 1\n seconds: 0\n milliseconds: 0\n - action: light.turn_off\n metadata: {}\n data: {}\n target:\n entity_id: light.shellyplus2pm_c82e180d5f10_switch_1\n mode: single",
"config": [
{
"name": "corridor light switch",
"room": "corridor",
"type": "light",
"id": {
"entity_id": "light.shellyplus2pm_c82e180d5f10_switch_1",
"device_id": null
}
},
{
"name": "living room lower",
"room": "living room",
"type": "light",
"id": {
"entity_id": "light.sala_inferior",
"device_id": null
}
},
{
"name": "Device a5dd3a6582b27b004323486771a64137",
"room": "Living Room",
"type": "media_player",
"id": {
"entity_id": "a5dd3a6582b27b004323486771a64137",
"device_id": null
}
},
{
"name": "Device d686deeba13232cfa6ab008fa8c80dc0",
"room": "Living Room",
"type": "button",
"id": {
"entity_id": "d686deeba13232cfa6ab008fa8c80dc0",
"device_id": null
}
},
{
"name": "Device e8a6c706997d87b98183e26e7598ae8b",
"room": "Living Room",
"type": "button",
"id": {
"entity_id": "e8a6c706997d87b98183e26e7598ae8b",
"device_id": null
}
}
]
},
{
"id": "'1745225774697'",
"automation": "- id: '1745225774697'\n alias: ♨️ Heat Pump Error\n description: ''\n triggers:\n - trigger: state\n entity_id:\n - sensor.hpsu_can_error_code\n from: No Error\n id: Error\n - trigger: state\n entity_id:\n - sensor.hpsu_can_error_code\n id: ok\n to: No Error\n conditions: []\n actions:\n - choose:\n - conditions:\n - condition: trigger\n id:\n - Error\n sequence:\n - action: telegram_bot.send_message\n metadata: {}\n data:\n message: 'A bomba de calor está em Erro.\n\n *ERROR:* {{states(''sensor.hpsu_can_error_code'') }}\n\n '\n title: ❌ Error Bomba de Calor ❌\n - conditions:\n - condition: trigger\n id:\n - ok\n sequence:\n - action: telegram_bot.send_message\n metadata: {}\n data:\n message: 'A bomba de calor está em {{states(''sensor.hpsu_can_error_code'')\n }}\n\n '\n title: ✅ OK Bomba de Calor ✅\n mode: single",
"config": [
{
"name": "telegram bot",
"room": null,
"type": "telegram_bot",
"id": {
"entity_id": "telegram_bot.send_message",
"device_id": null
}
},
{
"name": "heat pump error code",
"room": "heating",
"type": "sensor",
"id": {
"entity_id": "sensor.hpsu_can_error_code",
"device_id": null
}
}
]
},
{
"id": "'1745483501867'",
"automation": "- id: '1745483501867'\n alias: ♨️ Hot Water Production Best price\n description: ''\n triggers:\n - at: sensor.aquecimento_agua_noite\n trigger: time\n conditions:\n - type: is_temperature\n condition: device\n device_id: dbbed3fc0849f129296b804033d10b74\n entity_id: 869298e5bb3f09e40bb45c5ab1d10091\n domain: sensor\n below: 45\n actions:\n - device_id: dbbed3fc0849f129296b804033d10b74\n domain: select\n entity_id: aa534d8176126b2ad55749fb0cc47992\n type: select_option\n option: 'On'\n mode: single",
"config": [
{
"name": "night water heating",
"room": "heating",
"type": "sensor",
"id": {
"entity_id": "sensor.aquecimento_agua_noite",
"device_id": null
}
},
{
"name": "Device 869298e5bb3f09e40bb45c5ab1d10091",
"room": null,
"type": "sensor",
"id": {
"entity_id": "869298e5bb3f09e40bb45c5ab1d10091",
"device_id": null
}
},
{
"name": "Device aa534d8176126b2ad55749fb0cc47992",
"room": null,
"type": "select",
"id": {
"entity_id": "aa534d8176126b2ad55749fb0cc47992",
"device_id": null
}
},
{
"name": "Device dbbed3fc0849f129296b804033d10b74",
"room": null,
"type": "sensor",
"id": {
"entity_id": "dbbed3fc0849f129296b804033d10b74",
"device_id": null
}
}
]
},
{
"id": "'1745509795599'",
"automation": "- id: '1745509795599'\n alias: '[🏡] Botão shelly Abrir Portão'\n description: ''\n triggers:\n - device_id: f3ec058f8ec36d128a8eaf0dd7286320\n domain: bthome\n type: button\n subtype: press\n trigger: device\n conditions: []\n actions:\n - type: toggle\n device_id: c943a1b7851c56da555470902baf07a1\n entity_id: 9e3a402090766bb2d314909658c4ee90\n domain: switch\n mode: single",
"config": [
{
"name": "Device 9e3a402090766bb2d314909658c4ee90",
"room": "Gate",
"type": "switch",
"id": {
"entity_id": "9e3a402090766bb2d314909658c4ee90",
"device_id": null
}
},
{
"name": "Device c943a1b7851c56da555470902baf07a1",
"room": "Gate",
"type": "switch",
"id": {
"entity_id": "c943a1b7851c56da555470902baf07a1",
"device_id": null
}
},
{
"name": "Device f3ec058f8ec36d128a8eaf0dd7286320",
"room": "Gate",
"type": "button",
"id": {
"entity_id": "f3ec058f8ec36d128a8eaf0dd7286320",
"device_id": null
}
}
]
},
{
"id": "'1745945849501'",
"automation": "- id: '1745945849501'\n alias: '🪟Botão Sala Estore1 '\n description: ''\n triggers:\n - device_id: e8a6c706997d87b98183e26e7598ae8b\n domain: shelly\n type: double\n subtype: button\n trigger: device\n conditions: []\n actions:\n - action: cover.toggle\n metadata: {}\n data: {}\n target:\n entity_id: cover.estore1_cover_0\n mode: single",
"config": [
{
"name": "store1 cover 0",
"room": "living room",
"type": "cover",
"id": {
"entity_id": "cover.estore1_cover_0",
"device_id": null
}
},
{
"name": "Device e8a6c706997d87b98183e26e7598ae8b",
"room": "Living Room",
"type": "button",
"id": {
"entity_id": "e8a6c706997d87b98183e26e7598ae8b",
"device_id": null
}
}
]
},
{
"id": "'1746728025652'",
"automation": "- id: '1746728025652'\n alias: 🏊🏻Atualizar pH filtrado com bomba ligada\n description: ''\n triggers:\n - entity_id:\n - switch.bomba_piscina_switch_0\n to: 'on'\n trigger: state\n id: bomba\n from: 'off'\n - entity_id: sensor.ph_corrigido\n trigger: state\n enabled: true\n - trigger: time_pattern\n minutes: /5\n conditions:\n - condition: state\n entity_id: switch.bomba_piscina_switch_0\n state: 'on'\n for:\n hours: 0\n minutes: 10\n seconds: 0\n - condition: template\n value_template: '{{ states(''sensor.ph_corrigido'') not in [''unavailable'', ''unknown'']\n }}'\n actions:\n - target:\n entity_id:\n - input_number.ph_sensor_filtrado\n data:\n value: '{{ states(''sensor.ph_sensor'') | float(2) }}'\n action: input_number.set_value\n - target:\n entity_id: input_number.ph_filtrado\n data:\n value: '{{ states(''sensor.ph_corrigido'') | float(2) }}'\n action: input_number.set_value\n mode: single",
"config": [
{
"name": "pool pump",
"room": "pool",
"type": "switch",
"id": {
"entity_id": "switch.bomba_piscina",
"device_id": null
}
},
{
"name": "pool pump switch 0",
"room": "pool",
"type": "switch",
"id": {
"entity_id": "switch.bomba_piscina_switch_0",
"device_id": null
}
},
{
"name": "corrected ph",
"room": "pool",
"type": "sensor",
"id": {
"entity_id": "sensor.ph_corrigido",
"device_id": null
}
},
{
"name": "ph sensor filtered",
"room": "pool",
"type": "input_number",
"id": {
"entity_id": "input_number.ph_sensor_filtrado",
"device_id": null
}
},
{
"name": "ph sensor",
"room": "pool",
"type": "sensor",
"id": {
"entity_id": "sensor.ph_sensor",
"device_id": null
}
},
{
"name": "ph filtered",
"room": "pool",
"type": "input_number",
"id": {
"entity_id": "input_number.ph_filtrado",
"device_id": null
}
}
]
},
{
"id": "'1746780173077'",
"automation": "- id: '1746780173077'\n alias: 🏊🏻Atualizar Temperatura Piscina filtrado com bomba de aquecimento ligada\n description: ''\n triggers:\n - trigger: time_pattern\n minutes: /5\n conditions:\n - condition: state\n entity_id: switch.aquecimento_piscina_channel_1\n state: 'on'\n for:\n hours: 0\n minutes: 10\n seconds: 0\n - condition: template\n value_template: '{{ states(''sensor.bomba_piscina_temperature'') not in [''unavailable'',\n ''unknown''] }}'\n actions:\n - target:\n entity_id:\n - input_number.temperatura_piscina_filtrado\n data:\n value: '{{ states(''sensor.bomba_piscina_temperature'') | float(2) }}'\n action: input_number.set_value\n mode: single",
"config": [
{
"name": "pool pump temperature",
"room": "pool",
"type": "sensor",
"id": {
"entity_id": "sensor.bomba_piscina_temperature",
"device_id": null
}
},
{
"name": "pool heating switch channel 1",
"room": "pool",
"type": "switch",
"id": {
"entity_id": "switch.aquecimento_piscina_channel_1",
"device_id": null
}
},
{
"name": "pool temperature filtered",
"room": "pool",
"type": "input_number",
"id": {
"entity_id": "input_number.temperatura_piscina_filtrado",
"device_id": null
}
}
]
},
{
"id": "'1747047245923'",
"automation": "- id: '1747047245923'\n alias: New automation\n description: ''\n triggers:\n - trigger: time_pattern\n seconds: '30'\n conditions: []\n actions:\n - action: weather.get_forecasts\n metadata: {}\n data:\n type: hourly\n target:\n entity_id: weather.forecast_home\n response_variable: forecast_data\n mode: single",
"config": [
{
"name": "forecast home weather",
"room": "home",
"type": "weather",
"id": {
"entity_id": "weather.forecast_home",
"device_id": null
}
},
{
"name": "forecast weather",
"room": null,
"type": "weather",
"id": {
"entity_id": "weather.forecast",
"device_id": null
}
}
]
},
{
"id": "'1747047675015'",
"automation": "- id: '1747047675015'\n alias: ☁Atualiza média de nuvens nas próximas 8h\n description: ''\n triggers:\n - hours: /1\n trigger: time_pattern\n actions:\n - target:\n entity_id: weather.forecast\n data:\n type: hourly\n response_variable: forecast\n action: weather.get_forecasts\n - variables:\n clouds: \"{{ forecast['weather.forecast']['forecast'][:8]\\n | map(attribute='cloud_coverage')\\n\\\n \\ | reject('none')\\n | list }}\\n\"\n avg_clouds: \"{% if clouds | length > 0 %}\\n {{ (clouds | map('float') | sum\\\n \\ / clouds | length)\\n | round(1) }}\\n{% else %}\\n 0\\n{% endif %}\\n\"\n - data:\n entity_id: input_number.average_cloud_cover\n value: '{{ avg_clouds }}'\n action: input_number.set_value",
"config": [
{
"name": "forecast weather",
"room": null,
"type": "weather",
"id": {
"entity_id": "weather.forecast",
"device_id": null
}
},
{
"name": "average cloud cover",
"room": null,
"type": "input_number",
"id": {
"entity_id": "input_number.average_cloud_cover",
"device_id": null
}
}
]
},
{
"id": "'1747048335609'",
"automation": "- id: '1747048335609'\n alias: ☁Atualiza média de nuvens entre as 10:00 e as 18:00\n description: ''\n triggers:\n - hours: /1\n trigger: time_pattern\n conditions: []\n actions:\n - if:\n - condition: time\n after: 00:00:00\n before: '19:00:00'\n then:\n - target:\n entity_id: weather.forecast\n data:\n type: hourly\n response_variable: forecast\n action: weather.get_forecasts\n - variables:\n entries: '{{ forecast[''weather.forecast''][''forecast''] }}\n\n '\n start: '{{ utcnow().replace(hour=10, minute=0, second=0, microsecond=0).isoformat(sep=''T'')\n }}\n\n '\n end: '{{ utcnow().replace(hour=18, minute=0, second=0, microsecond=0).isoformat(sep=''T'')\n }}\n\n '\n clouds: \"{{ entries\\n | selectattr('datetime', '>=', start)\\n | selectattr('datetime',\\\n \\ '<=', end)\\n | map(attribute='cloud_coverage')\\n | reject('none')\\n\\\n \\ | list }}\\n\"\n avg_clouds: \"{% if clouds | length > 0 %}\\n {{ (clouds | map('float') | sum\\\n \\ / clouds | length) | round(1) }}\\n{% else %}\\n 0\\n{% endif %}\\n\"\n - data:\n entity_id: input_number.average_cloud_cover_piscina\n value: '{{ avg_clouds }}'\n action: input_number.set_value\n else:\n - target:\n entity_id: weather.forecast\n data:\n type: hourly\n response_variable: forecast\n action: weather.get_forecasts\n - variables:\n entries: '{{ forecast[''weather.forecast''][''forecast''] }}\n\n '\n start: '{{ (utcnow() + timedelta(days=1)).replace(hour=10, minute=0, second=0,\n microsecond=0).isoformat(sep=''T'') }}\n\n '\n end: '{{ (utcnow() + timedelta(days=1)).replace(hour=18, minute=0, second=0,\n microsecond=0).isoformat(sep=''T'') }}\n\n '\n clouds: \"{{ entries\\n | selectattr('datetime', '>=', start)\\n | selectattr('datetime',\\\n \\ '<=', end)\\n | map(attribute='cloud_coverage')\\n | reject('none')\\n\\\n \\ | list }}\\n\"\n avg_clouds: \"{% if clouds | length > 0 %}\\n {{ (clouds | map('float') | sum\\\n \\ / clouds | length) | round(1) }}\\n{% else %}\\n 0\\n{% endif %}\\n\"\n - data:\n entity_id: input_number.average_cloud_cover_piscina\n value: '{{ avg_clouds }}'\n action: input_number.set_value\n mode: single",
"config": [
{
"name": "forecast weather",
"room": null,
"type": "weather",
"id": {
"entity_id": "weather.forecast",
"device_id": null
}
},
{
"name": "average cloud cover",
"room": null,
"type": "input_number",
"id": {
"entity_id": "input_number.average_cloud_cover",
"device_id": null
}
},
{
"name": "average cloud cover pool",
"room": "pool",
"type": "input_number",
"id": {
"entity_id": "input_number.average_cloud_cover_piscina",
"device_id": null
}
}
]
},
{
"id": "'1747216234443'",
"automation": "- id: '1747216234443'\n alias: 🏊🏻 Actualizar Horario Bomba Piscina Noite\n description: ''\n triggers:\n - trigger: time_pattern\n minutes: /30\n hours: /1\n - trigger: state\n entity_id:\n - sensor.bomba_piscina_noite_horario\n conditions:\n - condition: time\n after: '13:00:00'\n before: '21:00:00'\n actions:\n - action: input_datetime.set_datetime\n metadata: {}\n data:\n datetime: \"{% set horario = states('sensor.bomba_piscina_noite_horario') %}\\n\\\n {% if horario not in ['unknown', 'unavailable', '', None] %}\\n {{ as_datetime(horario).astimezone().isoformat()\\\n \\ }}\\n{% else %}\\n {{ (now() + timedelta(days=1)).replace(hour=2, minute=0,\\\n \\ second=0, microsecond=0).isoformat() }}\\n{% endif %}\"\n target:\n entity_id: input_datetime.horario_piscina_noite\n mode: single",
"config": [
{
"name": "pool night schedule",
"room": "pool",
"type": "input_datetime",
"id": {
"entity_id": "input_datetime.horario_piscina_noite",
"device_id": null
}
},
{
"name": "pool pump night schedule",
"room": "pool",
"type": "sensor",
"id": {
"entity_id": "sensor.bomba_piscina_noite_horario",
"device_id": null
}
}
]
},
{
"id": "'1747335289002'",
"automation": "- id: '1747335289002'\n alias: 🏊🏻Bomba Peristaltica\n description: ''\n triggers:\n - trigger: state\n entity_id:\n - switch.bomba_piscina_switch_0\n - trigger: time_pattern\n minutes: /5\n conditions:\n - condition: device\n type: is_on\n device_id: e5f1b9b1d10308b32ef8f69bc0d20d74\n entity_id: 43f5cd2f7257fed3e55788df58ce96de\n domain: switch\n actions:\n - if:\n - condition: device\n type: is_on\n device_id: e5f1b9b1d10308b32ef8f69bc0d20d74\n entity_id: 43f5cd2f7257fed3e55788df58ce96de\n domain: switch\n - condition: numeric_state\n entity_id: sensor.ph_corrigido_filtrado\n above: 7.5\n then:\n - action: switch.turn_on\n metadata: {}\n data: {}\n target:\n entity_id:\n - switch.bomba_peristaltica_switch_0\n else:\n - action: switch.turn_off\n metadata: {}\n data: {}\n target:\n entity_id:\n - switch.bomba_peristaltica_switch_0\n mode: single",
"config": [
{
"name": "pool pump",
"room": "pool",
"type": "switch",
"id": {
"entity_id": "switch.bomba_piscina",
"device_id": null
}
},
{
"name": "pool pump switch 0",
"room": "pool",
"type": "switch",
"id": {
"entity_id": "switch.bomba_piscina_switch_0",
"device_id": null
}
},
{
"name": "corrected ph",
"room": "pool",
"type": "sensor",
"id": {
"entity_id": "sensor.ph_corrigido",
"device_id": null
}
},
{
"name": "ph corrected filtered",
"room": "pool",
"type": "sensor",
"id": {
"entity_id": "sensor.ph_corrigido_filtrado",
"device_id": null
}
},
{
"name": "pool peristaltic pump switch 0",
"room": "pool",
"type": "switch",
"id": {
"entity_id": "switch.bomba_peristaltica_switch_0",
"device_id": null
}
},
{
"name": "Device 43f5cd2f7257fed3e55788df58ce96de",
"room": "Pool",
"type": "switch",
"id": {
"entity_id": "43f5cd2f7257fed3e55788df58ce96de",
"device_id": null
}
},
{
"name": "Device e5f1b9b1d10308b32ef8f69bc0d20d74",
"room": "Pool",
"type": "switch",
"id": {
"entity_id": "e5f1b9b1d10308b32ef8f69bc0d20d74",
"device_id": null
}
}
]
},
{
"id": "'1748274888683'",
"automation": "- id: '1748274888683'\n alias: 🪟Abrir Estore 1\n description: ''\n triggers:\n - device_id: d686deeba13232cfa6ab008fa8c80dc0\n domain: bthome\n type: button_3\n subtype: press\n trigger: device\n conditions: []\n actions:\n - if:\n - condition: or\n conditions:\n - condition: device\n device_id: cfd18037256cb019fa29781e93e644d7\n domain: cover\n entity_id: 8749320a26b0fe2753d119e46c5cba27\n type: is_opening\n - condition: device\n device_id: cfd18037256cb019fa29781e93e644d7\n domain: cover\n entity_id: 8749320a26b0fe2753d119e46c5cba27\n type: is_closing\n then:\n - action: cover.stop_cover\n metadata: {}\n data: {}\n target:\n entity_id: cover.estore1_cover_0\n else:\n - action: cover.open_cover\n metadata: {}\n data: {}\n target:\n entity_id: cover.estore1_cover_0\n mode: single",
"config": [
{
"name": "store1 cover 0",
"room": "living room",
"type": "cover",
"id": {
"entity_id": "cover.estore1_cover_0",
"device_id": null
}
},
{
"name": "Device 8749320a26b0fe2753d119e46c5cba27",
"room": "Living Room",
"type": "cover",
"id": {
"entity_id": "8749320a26b0fe2753d119e46c5cba27",
"device_id": null
}
},
{
"name": "Device cfd18037256cb019fa29781e93e644d7",
"room": "Living Room",
"type": "cover",
"id": {
"entity_id": "cfd18037256cb019fa29781e93e644d7",
"device_id": null
}
},
{
"name": "Device d686deeba13232cfa6ab008fa8c80dc0",
"room": "Living Room",
"type": "button",
"id": {
"entity_id": "d686deeba13232cfa6ab008fa8c80dc0",
"device_id": null
}
}
]
},
{
"id": "'1748276682652'",
"automation": "- id: '1748276682652'\n alias: 🪟Fechar Estore 1\n description: ''\n triggers:\n - device_id: d686deeba13232cfa6ab008fa8c80dc0\n domain: bthome\n type: button_4\n subtype: press\n trigger: device\n conditions: []\n actions:\n - if:\n - condition: or\n conditions:\n - condition: device\n device_id: cfd18037256cb019fa29781e93e644d7\n domain: cover\n entity_id: 8749320a26b0fe2753d119e46c5cba27\n type: is_opening\n - condition: device\n device_id: cfd18037256cb019fa29781e93e644d7\n domain: cover\n entity_id: 8749320a26b0fe2753d119e46c5cba27\n type: is_closing\n then:\n - action: cover.stop_cover\n metadata: {}\n data: {}\n target:\n entity_id: cover.estore1_cover_0\n else:\n - action: cover.close_cover\n metadata: {}\n data: {}\n target:\n entity_id: cover.estore1_cover_0\n mode: single",
"config": [
{
"name": "store1 cover 0",
"room": "living room",
"type": "cover",
"id": {
"entity_id": "cover.estore1_cover_0",
"device_id": null
}
},
{
"name": "Device 8749320a26b0fe2753d119e46c5cba27",
"room": "Living Room",
"type": "cover",
"id": {
"entity_id": "8749320a26b0fe2753d119e46c5cba27",
"device_id": null
}
},
{
"name": "Device cfd18037256cb019fa29781e93e644d7",
"room": "Living Room",
"type": "cover",
"id": {
"entity_id": "cfd18037256cb019fa29781e93e644d7",
"device_id": null
}
},
{
"name": "Device d686deeba13232cfa6ab008fa8c80dc0",
"room": "Living Room",
"type": "button",
"id": {
"entity_id": "d686deeba13232cfa6ab008fa8c80dc0",
"device_id": null
}
}
]
},
{
"id": "ev_gate_sem_starvation",
"automation": "- id: ev_gate_sem_starvation\n alias: 🚗 EV (cFos) — Só depois da bomba + Vazio 22:0008:00\n mode: single\n trigger:\n - platform: time\n at: '22:00:00'\n - platform: state\n entity_id: switch.bomba_piscina_switch_0\n to: 'on'\n for: 00:01:00\n - platform: numeric_state\n entity_id: input_number.piscina_filtracao_min_restantes\n below: 1\n - platform: time\n at: 08:00:00\n - platform: state\n entity_id: switch.bomba_piscina_switch_0\n to: 'off'\n for: 00:00:10\n action:\n - variables:\n em_vazio: \"{{ now().time() >= as_datetime(strptime('22:00:00','%H:%M:%S')).time()\\n\\\n \\ or now().time() < as_datetime(strptime('08:00:00','%H:%M:%S')).time()\\\n \\ }}\"\n pump_on: '{{ is_state(''switch.bomba_piscina_switch_0'',''on'') }}'\n pool_done: '{% set m = states(''input_number.piscina_filtracao_min_restantes'')\n %} {{ m not in [''unknown'',''unavailable'',''''] and (m|float(0) <= 0) }}'\n - choose:\n - conditions: '{{ em_vazio or pump_on or pool_done }}'\n sequence:\n - service: switch.turn_on\n target:\n entity_id: switch.powerbrain_wallbox_enable_charging\n - conditions: '{{ (not em_vazio) and (not pump_on) and (not pool_done) }}'\n sequence:\n - service: switch.turn_off\n target:\n entity_id: switch.powerbrain_wallbox_enable_charging",
"config": [
{
"name": "pool pump",
"room": "pool",
"type": "switch",
"id": {
"entity_id": "switch.bomba_piscina",
"device_id": null
}
},
{
"name": "pool pump switch 0",
"room": "pool",
"type": "switch",
"id": {
"entity_id": "switch.bomba_piscina_switch_0",
"device_id": null
}
},
{
"name": "pool remaining filtration minutes",
"room": "pool",
"type": "input_number",
"id": {
"entity_id": "input_number.piscina_filtracao_min_restantes",
"device_id": null
}
},
{
"name": "Wallbox Enable Charging",
"room": "EV Charging",
"type": "switch",
"id": {
"entity_id": "switch.powerbrain_wallbox_enable_charging",
"device_id": null
}
}
]
},
{
"id": "ev_allow_at_22",
"automation": "- id: ev_allow_at_22\n alias: 🚗 EV (cFos) — Permitir às 22:00\n trigger:\n - platform: time\n at: '22:00:00'\n action:\n - service: switch.turn_on\n target:\n entity_id: switch.wallbox_charging_enabled",
"config": [
{
"name": "wallbox charging enabled",
"room": "garage",
"type": "switch",
"id": {
"entity_id": "switch.wallbox_charging_enabled",
"device_id": null
}
}
]
},
{
"id": "ev_reapply_gate_at_08",
"automation": "- id: ev_reapply_gate_at_08\n alias: 🚗 EV (cFos) — Reaplicar gate às 08:00\n trigger:\n - platform: time\n at: 08:00:00\n action:\n - if:\n - condition: template\n value_template: '{% set pump_on = is_state(''switch.bomba_piscina_switch_0'',''on'')\n %} {% set m = states(''input_number.piscina_filtracao_min_restantes'') %}\n {% set pool_done = (m not in [''unknown'',''unavailable'',''''] and (m|float(0)\n <= 0)) %} {{ not (pump_on or pool_done) }}'\n then:\n - service: switch.turn_off\n target:\n entity_id: switch.wallbox_charging_enabled",
"config": [
{
"name": "pool pump",
"room": "pool",
"type": "switch",
"id": {
"entity_id": "switch.bomba_piscina",
"device_id": null
}
},
{
"name": "pool pump switch 0",
"room": "pool",
"type": "switch",
"id": {
"entity_id": "switch.bomba_piscina_switch_0",
"device_id": null
}
},
{
"name": "pool remaining filtration minutes",
"room": "pool",
"type": "input_number",
"id": {
"entity_id": "input_number.piscina_filtracao_min_restantes",
"device_id": null
}
},
{
"name": "wallbox charging enabled",
"room": "garage",
"type": "switch",
"id": {
"entity_id": "switch.wallbox_charging_enabled",
"device_id": null
}
}
]
},
{
"id": "piscina_cloro_tpo_seconds",
"automation": "- id: piscina_cloro_tpo_seconds\n alias: Piscina - Cloração TPO por Cobertura (segundos)\n trigger:\n - platform: time_pattern\n seconds: /30\n variables:\n janela_min: '{{ states(''input_number.piscina_cloro_janela_min'') | int(10) }}'\n janela_s: '{{ janela_min * 60 }}'\n pct_aberta: '{{ states(''input_number.piscina_pct_cobertura_aberta'') | float(100)\n }}'\n pct_fechada: '{{ states(''input_number.piscina_pct_cobertura_fechada'') | float(30)\n }}'\n pct: \"{{ pct_fechada if is_state('input_boolean.piscina_cobertura_fechada','on')\\n\\\n \\ else pct_aberta }}\"\n on_s: '{{ (pct/100 * janela_s) | int }}'\n ciclo_s: '{{ (now().timestamp() | int) % janela_s }}'\n condition:\n - condition: state\n entity_id: input_boolean.piscina_cloro_tpo_enable\n state: 'on'\n - condition: state\n entity_id: switch.bomba_piscina_switch_0\n state: 'on'\n action:\n - choose:\n - conditions: '{{ pct >= 99 }}'\n sequence:\n - service: switch.turn_on\n target:\n entity_id: switch.piscina_cloro_permitir_producao\n - conditions: '{{ pct <= 1 }}'\n sequence:\n - service: switch.turn_off\n target:\n entity_id: switch.piscina_cloro_permitir_producao\n - conditions: '{{ ciclo_s < on_s }}'\n sequence:\n - service: switch.turn_on\n target:\n entity_id: switch.piscina_cloro_permitir_producao\n - conditions: []\n sequence:\n - service: switch.turn_off\n target:\n entity_id: switch.piscina_cloro_permitir_producao\n mode: single",
"config": [
{
"name": "pool pump",
"room": "pool",
"type": "switch",
"id": {
"entity_id": "switch.bomba_piscina",
"device_id": null
}
},
{
"name": "pool pump switch 0",
"room": "pool",
"type": "switch",
"id": {
"entity_id": "switch.bomba_piscina_switch_0",
"device_id": null
}
},
{
"name": "pool chlorine allow production",
"room": "pool",
"type": "switch",
"id": {
"entity_id": "switch.piscina_cloro_permitir_producao",
"device_id": null
}
},
{
"name": "pool chlorine window min",
"room": "pool",
"type": "input_number",
"id": {
"entity_id": "input_number.piscina_cloro_janela_min",
"device_id": null
}
},
{
"name": "pool cover open percent",
"room": "pool",
"type": "input_number",
"id": {
"entity_id": "input_number.piscina_pct_cobertura_aberta",
"device_id": null
}
},
{
"name": "pool cover closed percent",
"room": "pool",
"type": "input_number",
"id": {
"entity_id": "input_number.piscina_pct_cobertura_fechada",
"device_id": null
}
},
{
"name": "pool cover closed",
"room": "pool",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.piscina_cobertura_fechada",
"device_id": null
}
},
{
"name": "pool chlorine tpo enable",
"room": "pool",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.piscina_cloro_tpo_enable",
"device_id": null
}
}
]
},
{
"id": "piscina_cloro_tpo_failsafe",
"automation": "- id: piscina_cloro_tpo_failsafe\n alias: Piscina - Cloração TPO (failsafe OFF)\n trigger:\n - platform: state\n entity_id: switch.bomba_piscina_switch_0\n - platform: state\n entity_id: input_boolean.piscina_cloro_tpo_enable\n - platform: state\n entity_id: input_boolean.piscina_cobertura_fechada\n action:\n - choose:\n - conditions:\n - condition: or\n conditions:\n - condition: state\n entity_id: switch.bomba_piscina_switch_0\n state: 'off'\n - condition: state\n entity_id: input_boolean.piscina_cloro_tpo_enable\n state: 'off'\n sequence:\n - service: switch.turn_off\n target:\n entity_id: switch.piscina_cloro_permitir_producao\n mode: restart",
"config": [
{
"name": "pool pump",
"room": "pool",
"type": "switch",
"id": {
"entity_id": "switch.bomba_piscina",
"device_id": null
}
},
{
"name": "pool pump switch 0",
"room": "pool",
"type": "switch",
"id": {
"entity_id": "switch.bomba_piscina_switch_0",
"device_id": null
}
},
{
"name": "pool chlorine allow production",
"room": "pool",
"type": "switch",
"id": {
"entity_id": "switch.piscina_cloro_permitir_producao",
"device_id": null
}
},
{
"name": "pool cover closed",
"room": "pool",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.piscina_cobertura_fechada",
"device_id": null
}
},
{
"name": "pool chlorine tpo enable",
"room": "pool",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.piscina_cloro_tpo_enable",
"device_id": null
}
}
]
},
{
"id": "piscina_vazio_start",
"automation": "- id: piscina_vazio_start\n alias: 🏊🏻 Piscina - Início vazio 22:00\n trigger:\n - platform: time\n at: '22:00:00'\n condition:\n - condition: state\n entity_id: input_boolean.piscina_override_manual\n state: 'off'\n - condition: numeric_state\n entity_id: input_number.piscina_filtracao_min_restantes\n above: 0\n action:\n - service: switch.turn_on\n target:\n entity_id: switch.bomba_piscina_switch_0",
"config": [
{
"name": "pool pump",
"room": "pool",
"type": "switch",
"id": {
"entity_id": "switch.bomba_piscina",
"device_id": null
}
},
{
"name": "pool pump switch 0",
"room": "pool",
"type": "switch",
"id": {
"entity_id": "switch.bomba_piscina_switch_0",
"device_id": null
}
},
{
"name": "pool remaining filtration minutes",
"room": "pool",
"type": "input_number",
"id": {
"entity_id": "input_number.piscina_filtracao_min_restantes",
"device_id": null
}
},
{
"name": "pool override manual",
"room": "pool",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.piscina_override_manual",
"device_id": null
}
}
]
},
{
"id": "piscina_vazio_stop_por_objetivo",
"automation": "- id: piscina_vazio_stop_por_objetivo\n alias: 🏊🏻 Piscina - Paragem no vazio quando completar\n trigger:\n - platform: numeric_state\n entity_id: input_number.piscina_filtracao_min_restantes\n below: 1\n condition:\n - condition: state\n entity_id: input_boolean.piscina_override_manual\n state: 'off'\n - condition: time\n after: '22:00:00'\n before: 08:00:00\n action:\n - service: switch.turn_off\n target:\n entity_id: switch.bomba_piscina_switch_0",
"config": [
{
"name": "pool pump",
"room": "pool",
"type": "switch",
"id": {
"entity_id": "switch.bomba_piscina",
"device_id": null
}
},
{
"name": "pool pump switch 0",
"room": "pool",
"type": "switch",
"id": {
"entity_id": "switch.bomba_piscina_switch_0",
"device_id": null
}
},
{
"name": "pool remaining filtration minutes",
"room": "pool",
"type": "input_number",
"id": {
"entity_id": "input_number.piscina_filtracao_min_restantes",
"device_id": null
}
},
{
"name": "pool override manual",
"room": "pool",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.piscina_override_manual",
"device_id": null
}
}
]
},
{
"id": "piscina_vazio_stop_08",
"automation": "- id: piscina_vazio_stop_08\n alias: 🏊🏻 Piscina - Paragem às 08:00\n trigger:\n - platform: time\n at: 08:00:00\n condition:\n - condition: state\n entity_id: input_boolean.piscina_override_manual\n state: 'off'\n action:\n - service: switch.turn_off\n target:\n entity_id: switch.bomba_piscina_switch_0",
"config": [
{
"name": "pool pump",
"room": "pool",
"type": "switch",
"id": {
"entity_id": "switch.bomba_piscina",
"device_id": null
}
},
{
"name": "pool pump switch 0",
"room": "pool",
"type": "switch",
"id": {
"entity_id": "switch.bomba_piscina_switch_0",
"device_id": null
}
},
{
"name": "pool override manual",
"room": "pool",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.piscina_override_manual",
"device_id": null
}
}
]
},
{
"id": "piscina_reset_diario_minutos",
"automation": "- id: piscina_reset_diario_minutos\n alias: 🏊🏻 Piscina - Reset diário minutos (08:00:05)\n trigger:\n - platform: time\n at: 08:00:06\n action:\n - service: input_number.set_value\n target:\n entity_id: input_number.piscina_filtracao_min_restantes\n data:\n value: '{{ states(''sensor.piscina_minutos_recomendados'') | int(480) }}'",
"config": [
{
"name": "pool remaining filtration minutes",
"room": "pool",
"type": "input_number",
"id": {
"entity_id": "input_number.piscina_filtracao_min_restantes",
"device_id": null
}
},
{
"name": "pool minutes recommended",
"room": "pool",
"type": "sensor",
"id": {
"entity_id": "sensor.piscina_minutos_recomendados",
"device_id": null
}
}
]
},
{
"id": "piscina_arranque_solar",
"automation": "- id: piscina_arranque_solar\n alias: 🏊🏻 Piscina - Arranque com excedente FV\n trigger:\n - platform: state\n entity_id: binary_sensor.piscina_excedente_fv_bomba\n to: 'on'\n for: 00:05:00\n condition:\n - condition: state\n entity_id: input_boolean.piscina_override_manual\n state: 'off'\n - condition: numeric_state\n entity_id: input_number.piscina_filtracao_min_restantes\n above: 0\n - condition: sun\n after: sunrise\n after_offset: 00:15:00\n before: sunset\n before_offset: -00:15:00\n action:\n - service: switch.turn_on\n target:\n entity_id: switch.bomba_piscina_switch_0",
"config": [
{
"name": "pool pump",
"room": "pool",
"type": "switch",
"id": {
"entity_id": "switch.bomba_piscina",
"device_id": null
}
},
{
"name": "pool pump switch 0",
"room": "pool",
"type": "switch",
"id": {
"entity_id": "switch.bomba_piscina_switch_0",
"device_id": null
}
},
{
"name": "pool pump excedent fv sensor",
"room": "pool",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.piscina_excedente_fv_bomba",
"device_id": null
}
},
{
"name": "pool remaining filtration minutes",
"room": "pool",
"type": "input_number",
"id": {
"entity_id": "input_number.piscina_filtracao_min_restantes",
"device_id": null
}
},
{
"name": "pool override manual",
"room": "pool",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.piscina_override_manual",
"device_id": null
}
}
]
},
{
"id": "piscina_paragem_solar",
"automation": "- id: piscina_paragem_solar\n alias: 🏊🏻 Piscina - Paragem quando não há excedente ou objetivo cumprido\n trigger:\n - platform: state\n entity_id: binary_sensor.piscina_excedente_fv_bomba\n to: 'off'\n for: 00:05:00\n - platform: numeric_state\n entity_id: input_number.piscina_filtracao_min_restantes\n below: 1\n - platform: sun\n event: sunset\n offset: -00:10:00\n condition:\n - condition: state\n entity_id: input_boolean.piscina_override_manual\n state: 'off'\n action:\n - service: switch.turn_off\n target:\n entity_id: switch.bomba_piscina_switch_0",
"config": [
{
"name": "pool pump",
"room": "pool",
"type": "switch",
"id": {
"entity_id": "switch.bomba_piscina",
"device_id": null
}
},
{
"name": "pool pump switch 0",
"room": "pool",
"type": "switch",
"id": {
"entity_id": "switch.bomba_piscina_switch_0",
"device_id": null
}
},
{
"name": "pool pump excedent fv sensor",
"room": "pool",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.piscina_excedente_fv_bomba",
"device_id": null
}
},
{
"name": "pool remaining filtration minutes",
"room": "pool",
"type": "input_number",
"id": {
"entity_id": "input_number.piscina_filtracao_min_restantes",
"device_id": null
}
},
{
"name": "pool override manual",
"room": "pool",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.piscina_override_manual",
"device_id": null
}
}
]
},
{
"id": "piscina_arranque_solar_watchdog",
"automation": "- id: piscina_arranque_solar_watchdog\n alias: 🏊🏻 Piscina - Watchdog arranque FV (*/2min)\n trigger:\n - platform: time_pattern\n minutes: /2\n condition:\n - condition: state\n entity_id: input_boolean.piscina_override_manual\n state: 'off'\n - condition: state\n entity_id: switch.bomba_piscina_switch_0\n state: 'off'\n - condition: numeric_state\n entity_id: input_number.piscina_filtracao_min_restantes\n above: 0\n - condition: state\n entity_id: binary_sensor.piscina_excedente_fv_bomba\n state: 'on'\n - condition: sun\n after: sunrise\n after_offset: 00:15:00\n before: sunset\n before_offset: -00:15:00\n action:\n - service: switch.turn_on\n target:\n entity_id: switch.bomba_piscina_switch_0",
"config": [
{
"name": "pool pump",
"room": "pool",
"type": "switch",
"id": {
"entity_id": "switch.bomba_piscina",
"device_id": null
}
},
{
"name": "pool pump switch 0",
"room": "pool",
"type": "switch",
"id": {
"entity_id": "switch.bomba_piscina_switch_0",
"device_id": null
}
},
{
"name": "pool pump excedent fv sensor",
"room": "pool",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.piscina_excedente_fv_bomba",
"device_id": null
}
},
{
"name": "pool remaining filtration minutes",
"room": "pool",
"type": "input_number",
"id": {
"entity_id": "input_number.piscina_filtracao_min_restantes",
"device_id": null
}
},
{
"name": "pool override manual",
"room": "pool",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.piscina_override_manual",
"device_id": null
}
}
]
},
{
"id": "piscina_manual_finished",
"automation": "- id: piscina_manual_finished\n alias: 🏊🏻 Piscina - Manual terminou (voltar ao automático)\n mode: single\n trigger:\n - platform: event\n event_type: timer.finished\n event_data:\n entity_id: timer.piscina_manual\n - platform: state\n entity_id: timer.piscina_manual\n from: active\n to: idle\n action:\n - service: switch.turn_off\n target:\n entity_id: switch.bomba_piscina_switch_0\n - service: input_boolean.turn_off\n target:\n entity_id: input_boolean.piscina_override_manual",
"config": [
{
"name": "pool pump",
"room": "pool",
"type": "switch",
"id": {
"entity_id": "switch.bomba_piscina",
"device_id": null
}
},
{
"name": "pool pump switch 0",
"room": "pool",
"type": "switch",
"id": {
"entity_id": "switch.bomba_piscina_switch_0",
"device_id": null
}
},
{
"name": "pool manual timer",
"room": "pool",
"type": "timer",
"id": {
"entity_id": "timer.piscina_manual",
"device_id": null
}
},
{
"name": "pool override manual",
"room": "pool",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.piscina_override_manual",
"device_id": null
}
}
]
},
{
"id": "piscina_manual_watchdog",
"automation": "- id: piscina_manual_watchdog\n alias: 🏊🏻 Piscina - Watchdog manual (*/1min)\n trigger:\n - platform: time_pattern\n minutes: /1\n condition:\n - condition: state\n entity_id: input_boolean.piscina_override_manual\n state: 'on'\n - condition: not\n conditions:\n - condition: state\n entity_id: timer.piscina_manual\n state: active\n action:\n - service: switch.turn_off\n target:\n entity_id: switch.bomba_piscina_switch_0\n - service: input_boolean.turn_off\n target:\n entity_id: input_boolean.piscina_override_manual",
"config": [
{
"name": "pool pump",
"room": "pool",
"type": "switch",
"id": {
"entity_id": "switch.bomba_piscina",
"device_id": null
}
},
{
"name": "pool pump switch 0",
"room": "pool",
"type": "switch",
"id": {
"entity_id": "switch.bomba_piscina_switch_0",
"device_id": null
}
},
{
"name": "pool manual timer",
"room": "pool",
"type": "timer",
"id": {
"entity_id": "timer.piscina_manual",
"device_id": null
}
},
{
"name": "pool override manual",
"room": "pool",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.piscina_override_manual",
"device_id": null
}
}
]
},
{
"id": "piscina_sync_restantes_recomendado_menos_corridos",
"automation": "- id: piscina_sync_restantes_recomendado_menos_corridos\n alias: 🏊🏻 Piscina - Restantes = Recomendado Corridos (auto)\n trigger:\n - platform: state\n entity_id:\n - sensor.piscina_minutos_recomendados\n - sensor.piscina_minutos_on_08_08\n - timer.piscina_manual\n - platform: homeassistant\n event: start\n - platform: time\n at: 08:00:05\n condition:\n - condition: state\n entity_id: input_boolean.piscina_override_manual\n state: 'off'\n action:\n - variables:\n recomendado: '{{ states(''sensor.piscina_minutos_recomendados'') | int(0) }}'\n corridos: '{{ states(''sensor.piscina_minutos_on_08_08'') | int(0) }}'\n novos: '{{ [recomendado - corridos, 0] | max }}'\n - service: input_number.set_value\n target:\n entity_id: input_number.piscina_filtracao_min_restantes\n data:\n value: '{{ [novos, 1440] | min }}'",
"config": [
{
"name": "pool remaining filtration minutes",
"room": "pool",
"type": "input_number",
"id": {
"entity_id": "input_number.piscina_filtracao_min_restantes",
"device_id": null
}
},
{
"name": "pool manual timer",
"room": "pool",
"type": "timer",
"id": {
"entity_id": "timer.piscina_manual",
"device_id": null
}
},
{
"name": "pool override manual",
"room": "pool",
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.piscina_override_manual",
"device_id": null
}
},
{
"name": "pool minutes recommended",
"room": "pool",
"type": "sensor",
"id": {
"entity_id": "sensor.piscina_minutos_recomendados",
"device_id": null
}
},
{
"name": "pool minutes on 08 08",
"room": "pool",
"type": "sensor",
"id": {
"entity_id": "sensor.piscina_minutos_on_08_08",
"device_id": null
}
}
]
},
{
"id": "Sincronizar_bomba_piscina_com_bomba_peristaltica",
"automation": "- id: Sincronizar_bomba_piscina_com_bomba_peristaltica\n alias: 🏊🏻 Piscina - Sincronizar bomba piscina com bomba peristaltica\n description: Liga/Desliga o bomba piscina sempre que a bomba piscina mudar de estado\n mode: restart\n trigger:\n - platform: state\n entity_id: switch.bomba_piscina_switch_0\n action:\n - service: switch.turn_{{ trigger.to_state.state }}\n target:\n entity_id: switch.bomba_peristaltica_switch_0",
"config": [
{
"name": "pool pump",
"room": "pool",
"type": "switch",
"id": {
"entity_id": "switch.bomba_piscina",
"device_id": null
}
},
{
"name": "pool pump switch 0",
"room": "pool",
"type": "switch",
"id": {
"entity_id": "switch.bomba_piscina_switch_0",
"device_id": null
}
},
{
"name": "pool peristaltic pump switch 0",
"room": "pool",
"type": "switch",
"id": {
"entity_id": "switch.bomba_peristaltica_switch_0",
"device_id": null
}
}
]
}
]