move modules to hass

This commit is contained in:
2023-08-19 14:43:39 +02:00
parent 993aef1ece
commit 5ea365955d
31 changed files with 17 additions and 20 deletions

View File

@@ -0,0 +1,59 @@
{
services.home-assistant.config = {
"automation wakeup" = {
alias = "wakeup";
hide_entity = true;
trigger = {
platform = "template";
value_template = ''
{{ now().timestamp() | timestamp_custom('%H:%M') == (as_timestamp(strptime(states('sensor.bedtime_alarm'), "%H:%M")) - 1800) | timestamp_custom('%H:%M', false) }}
'';
};
action = {
service_template = "switch.turn_on";
data_template = {
entity_id = "switch.coffee_switch";
};
};
};
"automation sleep" = {
alias = "sleep";
hide_entity = true;
trigger = [
{
platform = "event";
event_type = "shelly.click";
event_data = {
device = "shellybutton1-E8DB84AA196D";
};
}
{
platform = "event";
event_type = "shelly.click";
event_data = {
device = "shellybutton1-E8DB84AA136D";
};
}
];
action = [
{
choose = [
{
conditions = [ "{{ trigger.event.data.click_type == \"long\" }}" ];
sequence = [
{
service = "light.turn_off";
entity_id = "all";
}
{
service = "light.turn_on";
entity_id = "light.bedroom_bed";
}
];
}
];
}
];
};
};
}