diff options
author | makefu <github@syntax-fehler.de> | 2020-11-18 20:50:43 +0100 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2020-11-18 20:51:14 +0100 |
commit | a54974412751c98dec78b5e3977afc4a97aadea9 (patch) | |
tree | a096472a2c762f04a67a795a922f26259517dd7a /makefu/2configs/bureautomation/automation/hass-restart.nix | |
parent | f66309f0289c76dc9797573a73acbad186f4e380 (diff) |
ma bureautomation: move to 20.09 style imports
Diffstat (limited to 'makefu/2configs/bureautomation/automation/hass-restart.nix')
-rw-r--r-- | makefu/2configs/bureautomation/automation/hass-restart.nix | 65 |
1 files changed, 34 insertions, 31 deletions
diff --git a/makefu/2configs/bureautomation/automation/hass-restart.nix b/makefu/2configs/bureautomation/automation/hass-restart.nix index be16f6966..3b3ce0599 100644 --- a/makefu/2configs/bureautomation/automation/hass-restart.nix +++ b/makefu/2configs/bureautomation/automation/hass-restart.nix @@ -1,31 +1,34 @@ -[ - { alias = "State on HA start-up"; - trigger = { - platform = "homeassistant"; - event = "start"; - }; - action = [ - # Startup State - { service = "mqtt.publish"; - data = { - topic = "/bam/sonoffs/cmnd/state"; - payload = ""; - }; - } - # Firmware Version - { service = "mqtt.publish"; - data = { - topic = "/bam/sonoffs/cmnd/status"; - payload = "2"; - }; - } - # Will trigger restart of all devices! - #{ service = "mqtt.publish"; - # data = { - # topic = "sonoffs/cmnd/SetOption59"; # configure sending state on power change - # payload = "1"; - # }; - #} - ]; - } -] +{ + services.home-assistant.config.automation = + [ + { alias = "State on HA start-up"; + trigger = { + platform = "homeassistant"; + event = "start"; + }; + action = [ + # Startup State + { service = "mqtt.publish"; + data = { + topic = "/bam/sonoffs/cmnd/state"; + payload = ""; + }; + } + # Firmware Version + { service = "mqtt.publish"; + data = { + topic = "/bam/sonoffs/cmnd/status"; + payload = "2"; + }; + } + # Will trigger restart of all devices! + #{ service = "mqtt.publish"; + # data = { + # topic = "sonoffs/cmnd/SetOption59"; # configure sending state on power change + # payload = "1"; + # }; + #} + ]; + } + ]; +} |