ma bureautomation: try to fix automation for fernseher
This commit is contained in:
parent
e2538baed3
commit
01f6f45216
|
@ -112,7 +112,6 @@ in {
|
||||||
"temperature" # "temperature_high" "temperature_low"
|
"temperature" # "temperature_high" "temperature_low"
|
||||||
"apparent_temperature"
|
"apparent_temperature"
|
||||||
"hourly_summary" # next 24 hours text
|
"hourly_summary" # next 24 hours text
|
||||||
"minutely_summary"
|
|
||||||
"humidity"
|
"humidity"
|
||||||
"pressure"
|
"pressure"
|
||||||
"uv_index" ];
|
"uv_index" ];
|
||||||
|
@ -213,26 +212,43 @@ in {
|
||||||
};
|
};
|
||||||
action = {
|
action = {
|
||||||
service = "homeassistant.turn_on";
|
service = "homeassistant.turn_on";
|
||||||
entity_id= "switch.fernseher";
|
entity_id = [ "switch.fernseher" "switch.blitzdings" ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
{ alias = "Turn off Fernseher 10 minutes after last movement";
|
{ alias = "Turn off Fernseher 10 minutes after last movement";
|
||||||
trigger = {
|
trigger = [
|
||||||
|
{ # trigger when movement was detected at the time
|
||||||
platform = "state";
|
platform = "state";
|
||||||
entity_id = "binary_sensor.motion";
|
entity_id = "binary_sensor.motion";
|
||||||
to = "off";
|
to = "off";
|
||||||
for.minutes = 10;
|
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 = {
|
action = {
|
||||||
service = "homeassistant.turn_off";
|
service = "homeassistant.turn_off";
|
||||||
entity_id= "switch.fernseher";
|
entity_id = [ "switch.fernseher" "switch.blitzdings" ];
|
||||||
};
|
};
|
||||||
condition = [{
|
condition =
|
||||||
|
{ condition = "and";
|
||||||
|
conditions = [
|
||||||
|
{
|
||||||
condition = "time";
|
condition = "time";
|
||||||
before = "06:30:00"; #only turn off between 6:30 and 18:00
|
before = "06:30:00"; #only turn off between 6:30 and 18:00
|
||||||
after = "18:00:00";
|
after = "18:00:00";
|
||||||
weekday = [ "mon" "tue" "wed" "thu" "fri" ];
|
# weekday = [ "mon" "tue" "wed" "thu" "fri" ];
|
||||||
}];
|
}
|
||||||
|
{
|
||||||
|
condition = "state";
|
||||||
|
entity_id = "binary_sensor.motion";
|
||||||
|
state = "off";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue