2019-03-06 15:42:27 +00:00
|
|
|
[
|
|
|
|
{
|
|
|
|
alias = "Turn off Nachtlicht on sunrise";
|
|
|
|
trigger =
|
|
|
|
{
|
|
|
|
platform = "sun";
|
|
|
|
event = "sunrise";
|
|
|
|
};
|
|
|
|
action =
|
|
|
|
{
|
|
|
|
service = "homeassistant.turn_off";
|
2019-04-04 07:50:16 +00:00
|
|
|
entity_id = [ "group.nachtlicht" ];
|
2019-03-06 15:42:27 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
alias = "Turn on Nachtlicht on motion and dusk";
|
|
|
|
trigger =
|
|
|
|
{
|
|
|
|
platform = "state";
|
|
|
|
entity_id = "binary_sensor.motion";
|
|
|
|
to = "on";
|
|
|
|
};
|
|
|
|
condition = # 'when dark'
|
|
|
|
{
|
|
|
|
condition = "or";
|
|
|
|
conditions = [
|
|
|
|
{ condition = "sun";
|
|
|
|
after = "sunset";
|
|
|
|
after_offset = "-00:45:00"; # on dusk
|
|
|
|
}
|
|
|
|
{ condition = "sun";
|
|
|
|
before = "sunrise";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
action =
|
|
|
|
{
|
|
|
|
service = "homeassistant.turn_on";
|
2019-04-04 07:50:16 +00:00
|
|
|
entity_id = [ "group.nachtlicht" ];
|
2019-03-06 15:42:27 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
]
|