ma bureautomation: add tasks for shutting down monitor

This commit is contained in:
makefu 2018-10-21 23:17:37 +02:00
parent d8e481ac79
commit 851c0e47d1
No known key found for this signature in database
GPG Key ID: 36F7711F3FC0F225

View File

@ -11,6 +11,11 @@ let
payload_available= "Online"; payload_available= "Online";
payload_not_available= "Offline"; payload_not_available= "Offline";
}; };
tasmota_stecki = name: topic:
( tasmota_plug name topic) //
{ state_topic = "/bam/${topic}/stat/POWER";
command_topic = "/bam/${topic}/cmnd/POWER";
};
espeasy_dht22 = name: [ espeasy_dht22 = name: [
{ platform = "mqtt"; { platform = "mqtt";
name = "${name} DHT22 Temperature"; name = "${name} DHT22 Temperature";
@ -72,7 +77,7 @@ in {
switch = [ switch = [
(tasmota_plug "Bauarbeiterlampe" "plug") (tasmota_plug "Bauarbeiterlampe" "plug")
(tasmota_plug "Blitzdings" "plug2") (tasmota_plug "Blitzdings" "plug2")
(tasmota_plug "Fernseher" "plug3") (tasmota_stecki "Fernseher" "fernseher")
(tasmota_plug "Pluggy" "plug4") (tasmota_plug "Pluggy" "plug4")
]; ];
binary_sensor = [ binary_sensor = [
@ -116,6 +121,31 @@ in {
frontend = { }; frontend = { };
http = { }; http = { };
feedreader.urls = [ "http://www.heise.de/security/rss/news-atom.xml" ]; feedreader.urls = [ "http://www.heise.de/security/rss/news-atom.xml" ];
automation = [
{ alias = "Turn on Fernseher on movement";
trigger = {
platform = "state";
entity_id = "binary_sensor.motion";
to = "on";
};
action = {
service= "homeassistant.turn_on";
entity_id= "switch.fernseher";
};
}
{ alias = "Turn off Fernseher 10 minutes after last movement";
trigger = {
platform = "state";
entity_id = "binary_sensor.motion";
to = "off";
for.minutes = 10;
};
action = {
service= "homeassistant.turn_off";
entity_id= "switch.fernseher";
};
}
];
}; };
}; };
} }