hass:high_availability
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
hass:high_availability [2020/06/03 09:59] – a | hass:high_availability [2020/06/03 10:33] – [Active/Standby State] a | ||
---|---|---|---|
Line 62: | Line 62: | ||
payload: !secret partner | payload: !secret partner | ||
retain: ' | retain: ' | ||
- | < | + | </code> |
Additionally, | Additionally, | ||
Line 105: | Line 105: | ||
This arrangement also allows for automations which should run regardless of whether the instance is active or not, or automations which run specifically when the instance is inactive. It does however require each automation to be modified with this condition, which may be onerous for an established setup. | This arrangement also allows for automations which should run regardless of whether the instance is active or not, or automations which run specifically when the instance is inactive. It does however require each automation to be modified with this condition, which may be onerous for an established setup. | ||
| | ||
+ | ==== Disabling/ | ||
+ | This method is a little more involved to implement, but does allow existing automations to be used unmodified. The first part of the puzzle is a script to create a group which contains all the current automations: | ||
+ | |||
+ | < | ||
+ | create_every_automation_group: | ||
+ | sequence: | ||
+ | - service: group.set | ||
+ | data_template: | ||
+ | object_id: every_automation | ||
+ | entities: '{{ states.automation | map(attribute='' | ||
+ | </ | ||
+ | |||
+ | With this group created we can now control the status of each automation with the '' | ||
+ | |||
+ | < | ||
+ | - id: ' | ||
+ | alias: HASS: | ||
+ | description: | ||
+ | trigger: | ||
+ | - entity_id: sensor.active | ||
+ | platform: state | ||
+ | to: !secret partner | ||
+ | condition: [] | ||
+ | action: | ||
+ | - data: {} | ||
+ | service: script.create_every_automation_group | ||
+ | - data: {} | ||
+ | entity_id: group.every_automation | ||
+ | service: automation.turn_off | ||
+ | - data: {} | ||
+ | entity_id: automation.hass_active | ||
+ | service: automation.turn_on | ||
+ | - id: ' | ||
+ | alias: HASS:Active | ||
+ | description: | ||
+ | trigger: | ||
+ | - entity_id: sensor.active | ||
+ | from: !secret partner | ||
+ | platform: state | ||
+ | condition: [] | ||
+ | action: | ||
+ | - data: {} | ||
+ | service: script.create_every_automation_group | ||
+ | - data: {} | ||
+ | entity_id: group.every_automation | ||
+ | service: automation.turn_on | ||
+ | </ | ||
+ | Note that after the instance is moved into standby, the last action of the HASS: |
hass/high_availability.txt · Last modified: 2021/08/13 23:36 by a