Add window warnings
This commit is contained in:
parent
2fa2b5ecbb
commit
860596b692
|
@ -314,7 +314,39 @@ in
|
||||||
];
|
];
|
||||||
action = [ (actions.setMode modes.schlafzimmer "force_active") ];
|
action = [ (actions.setMode modes.schlafzimmer "force_active") ];
|
||||||
}
|
}
|
||||||
# Warnung für offene Fenster oder Türen
|
{
|
||||||
|
alias = "Warnung bei lange offenem Fenster";
|
||||||
|
trigger = map (name: triggers.stateTrigger "binary_sensor.${name}" // { to = "on"; for = "00:10:00"; })
|
||||||
|
[
|
||||||
|
"kuechenfenster"
|
||||||
|
"wohnzimmerfenster"
|
||||||
|
"schlafzimmerfenster"
|
||||||
|
"wohnungstuer"
|
||||||
|
];
|
||||||
|
action = [ (actions.notify "{{ trigger.to_state.name }} ist seit mehr als 10 Minuten offen.") ];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
alias = "Warnung bei niedrigem Akkustand";
|
||||||
|
trigger =
|
||||||
|
{
|
||||||
|
platform = "numeric_state";
|
||||||
|
below = "25";
|
||||||
|
entity_id = map (name: "sensor.${name}") [
|
||||||
|
"wohnzimmerfenster_battery"
|
||||||
|
"thermostat_kueche_battery"
|
||||||
|
"thermostat_schlafzimmer_battery"
|
||||||
|
"thermostat_wohnzimmer_battery"
|
||||||
|
"klimasensor_bad_battery"
|
||||||
|
"klimasensor_kueche_battery"
|
||||||
|
"klimasensor_schlafzimmer_battery"
|
||||||
|
"kuechenfenster_battery"
|
||||||
|
"pegasus_battery_level"
|
||||||
|
"schlafzimmerfenster_battery"
|
||||||
|
"wohnungstuer_battery"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
action = [ (actions.notify "{{ trigger.to_state.name }} ist unter 25%.") ];
|
||||||
|
}
|
||||||
# Warnungen für niedrige Akkustände
|
# Warnungen für niedrige Akkustände
|
||||||
# Warnungen für hohe Luftfeuchtigkeit
|
# Warnungen für hohe Luftfeuchtigkeit
|
||||||
];
|
];
|
||||||
|
|
|
@ -22,6 +22,10 @@ rec {
|
||||||
cycleMode = mode: fromServiceAction (actions.cycleMode mode);
|
cycleMode = mode: fromServiceAction (actions.cycleMode mode);
|
||||||
};
|
};
|
||||||
actions = {
|
actions = {
|
||||||
|
notify = message: {
|
||||||
|
service = "notify.notify";
|
||||||
|
data = { inherit message; };
|
||||||
|
};
|
||||||
cycleMode = mode: {
|
cycleMode = mode: {
|
||||||
service = "input_select.select_next";
|
service = "input_select.select_next";
|
||||||
entity_id = util.modeSelectEntity mode;
|
entity_id = util.modeSelectEntity mode;
|
||||||
|
|
Loading…
Reference in a new issue