bureautomation: enable telegram bot

This commit is contained in:
makefu 2019-04-05 01:44:29 +02:00
parent 5761d563f5
commit 8172c60744
No known key found for this signature in database
GPG Key ID: 36F7711F3FC0F225
3 changed files with 37 additions and 10 deletions

View File

@ -128,7 +128,13 @@
}; };
action = action =
[ [
# TODO: Pushbullet {
service = "notify.telegrambot";
data = {
title = "Zu lange Felix!";
message = "Du bist schon 10 Stunden auf Arbeit, geh jetzt gefälligst nach Hause!";
};
}
{ {
service = "homeassistant.turn_on"; service = "homeassistant.turn_on";
entity_id = [ entity_id = [

View File

@ -28,14 +28,24 @@
at = "18:00:00"; at = "18:00:00";
} }
]; ];
action = { action = [
service = "homeassistant.turn_off"; {
entity_id = [ service = "homeassistant.turn_off";
"switch.fernseher" entity_id = [
"switch.feuer" "switch.fernseher"
"light.status_felix" "switch.feuer"
]; "light.status_felix"
}; "light.status_daniel"
];
}
{
service = "notify.telegrambot";
data = {
title = "Bureau Shutdown";
message = "All devices are turned off due to {{ trigger.platform }} - {{ trigger }}";
};
}
];
condition = condition =
{ condition = "and"; { condition = "and";
conditions = [ conditions = [

View File

@ -55,9 +55,16 @@ in {
notify = [ notify = [
{ {
platform = "kodi"; platform = "kodi";
name = "wbob"; name = "wbob-kodi";
host = kodi-host; host = kodi-host;
} }
{
platform = "telegram";
name = "telegrambot";
chat_id = builtins.elemAt
(builtins.fromJSON (builtins.readFile
<secrets/hass/telegram-bot.json>)).allowed_chat_ids 0;
}
]; ];
media_player = [ media_player = [
{ platform = "kodi"; { platform = "kodi";
@ -88,6 +95,10 @@ in {
logbook = {}; logbook = {};
tts = [ { platform = "google";} ]; tts = [ { platform = "google";} ];
recorder = {}; recorder = {};
telegram_bot = [
(builtins.fromJSON
(builtins.readFile <secrets/hass/telegram-bot.json>))
];
group = group =
{ default_view = { default_view =
{ view = "yes"; { view = "yes";