diff options
author | makefu <github@syntax-fehler.de> | 2020-02-19 14:36:21 +0100 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2020-02-19 14:36:21 +0100 |
commit | cc1659925919b777ee76fcab99e605cbf90057f4 (patch) | |
tree | a493a81e869c5696c9dec8b24b5cf0bd1875a3ce /krebs/2configs/shack/glados/lib | |
parent | d9e111716af4556cd5a29704080ba1e46c23ae02 (diff) |
shack/glados/lib: generalize tts
Diffstat (limited to 'krebs/2configs/shack/glados/lib')
-rw-r--r-- | krebs/2configs/shack/glados/lib/default.nix | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/krebs/2configs/shack/glados/lib/default.nix b/krebs/2configs/shack/glados/lib/default.nix index 16cbc6830..eb0528a06 100644 --- a/krebs/2configs/shack/glados/lib/default.nix +++ b/krebs/2configs/shack/glados/lib/default.nix @@ -9,22 +9,22 @@ in [ { service = "media_player.turn_on"; - data.entity_id = "media_player.lounge"; + data.entity_id = "media_player.${entity}"; } { service = "media_player.play_media"; data = { - entity_id = "media_player.lounge"; + entity_id = "media_player.${entity}"; media_content_type = "playlist"; media_content_id = "ansage"; }; } { service = "media_player.turn_on"; - data.entity_id = "media_player.lounge"; + data.entity_id = "media_player.${entity}"; } { delay.seconds = 8; } { service = "tts.say"; - entity_id = "media_player.lounge"; + entity_id = "media_player.${entity}"; data_template = { inherit message; language = "de"; @@ -41,6 +41,10 @@ in inherit message; entity = "herrenklo"; }; + kiosk = message: tts { + inherit message; + entity = "kiosk"; + }; }; esphome = { @@ -115,6 +119,22 @@ in state_topic = "${prefix}/${host}/sensor/${topic}/state"; availability_topic = "${prefix}/${host}/status"; }; + ip = {host, name ? "${host} IP", topic ? "ip_address" }: + { + platform = "mqtt"; + inherit name; + state_topic = "${prefix}/${host}/sensor/${topic}/state"; + availability_topic = "${prefix}/${host}/status"; + }; + wifi = {host, name ? "${host} Wifi Signal", topic ? "wifi_signal" }: + { + platform = "mqtt"; + unit_of_measurement = "dB"; + icon = "mdi:wifi"; + inherit name; + state_topic = "${prefix}/${host}/sensor/${topic}/state"; + availability_topic = "${prefix}/${host}/status"; + }; switch = {host, name ? "${host} Button", topic ? "btn" }: # host: ampel # name: Button 1 |