shack/glados/lib: generalize tts

This commit is contained in:
makefu 2020-02-19 14:36:21 +01:00
parent d9e111716a
commit cc16599259
No known key found for this signature in database
GPG Key ID: 36F7711F3FC0F225

View File

@ -9,22 +9,22 @@ in
[ [
{ {
service = "media_player.turn_on"; service = "media_player.turn_on";
data.entity_id = "media_player.lounge"; data.entity_id = "media_player.${entity}";
} }
{ service = "media_player.play_media"; { service = "media_player.play_media";
data = { data = {
entity_id = "media_player.lounge"; entity_id = "media_player.${entity}";
media_content_type = "playlist"; media_content_type = "playlist";
media_content_id = "ansage"; media_content_id = "ansage";
}; };
} }
{ {
service = "media_player.turn_on"; service = "media_player.turn_on";
data.entity_id = "media_player.lounge"; data.entity_id = "media_player.${entity}";
} }
{ delay.seconds = 8; } { delay.seconds = 8; }
{ service = "tts.say"; { service = "tts.say";
entity_id = "media_player.lounge"; entity_id = "media_player.${entity}";
data_template = { data_template = {
inherit message; inherit message;
language = "de"; language = "de";
@ -41,6 +41,10 @@ in
inherit message; inherit message;
entity = "herrenklo"; entity = "herrenklo";
}; };
kiosk = message: tts {
inherit message;
entity = "kiosk";
};
}; };
esphome = esphome =
{ {
@ -115,6 +119,22 @@ in
state_topic = "${prefix}/${host}/sensor/${topic}/state"; state_topic = "${prefix}/${host}/sensor/${topic}/state";
availability_topic = "${prefix}/${host}/status"; 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" }: switch = {host, name ? "${host} Button", topic ? "btn" }:
# host: ampel # host: ampel
# name: Button 1 # name: Button 1