summaryrefslogtreecommitdiffstats
path: root/2configs
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2018-12-13 01:31:41 +0100
committermakefu <github@syntax-fehler.de>2018-12-13 01:31:41 +0100
commit01f6f452167a9c4910c1663df2facf97263aa083 (patch)
tree31ade10edd62f2132407c6a8fcb3646d6e558c88 /2configs
parente2538baed3076d094a138740bfcaa3b86ac784d6 (diff)
ma bureautomation: try to fix automation for fernseher
Diffstat (limited to '2configs')
-rw-r--r--2configs/bureautomation/hass.nix42
1 files changed, 29 insertions, 13 deletions
diff --git a/2configs/bureautomation/hass.nix b/2configs/bureautomation/hass.nix
index 443484a34..a89a4813f 100644
--- a/2configs/bureautomation/hass.nix
+++ b/2configs/bureautomation/hass.nix
@@ -112,7 +112,6 @@ in {
"temperature" # "temperature_high" "temperature_low"
"apparent_temperature"
"hourly_summary" # next 24 hours text
- "minutely_summary"
"humidity"
"pressure"
"uv_index" ];
@@ -212,27 +211,44 @@ in {
to = "on";
};
action = {
- service= "homeassistant.turn_on";
- entity_id= "switch.fernseher";
+ service = "homeassistant.turn_on";
+ entity_id = [ "switch.fernseher" "switch.blitzdings" ];
};
}
{ alias = "Turn off Fernseher 10 minutes after last movement";
- trigger = {
+ trigger = [
+ { # trigger when movement was detected at the time
platform = "state";
entity_id = "binary_sensor.motion";
to = "off";
for.minutes = 10;
- };
+ }
+ { # trigger at 20:00 no matter what
+ # to avoid 'everybody left before 18:00:00'
+ platform = "time";
+ at = "18:00:00";
+ }
+ ];
action = {
- service= "homeassistant.turn_off";
- entity_id= "switch.fernseher";
+ service = "homeassistant.turn_off";
+ entity_id = [ "switch.fernseher" "switch.blitzdings" ];
+ };
+ condition =
+ { condition = "and";
+ conditions = [
+ {
+ condition = "time";
+ before = "06:30:00"; #only turn off between 6:30 and 18:00
+ after = "18:00:00";
+ # weekday = [ "mon" "tue" "wed" "thu" "fri" ];
+ }
+ {
+ condition = "state";
+ entity_id = "binary_sensor.motion";
+ state = "off";
+ }
+ ];
};
- condition = [{
- condition = "time";
- before = "06:30:00"; #only turn off between 6:30 and 18:00
- after = "18:00:00";
- weekday = [ "mon" "tue" "wed" "thu" "fri" ];
- }];
}
];
};
[cgit] Unable to lock slot /tmp/cgit/22100000.lock: No such file or directory (2)