summaryrefslogtreecommitdiffstats
path: root/2configs/home/ham/lib/default.nix
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2022-09-23 23:41:30 +0200
committermakefu <github@syntax-fehler.de>2022-09-23 23:41:30 +0200
commit11a4bf085e7a281fedb5a6d51a8db6c67cf044b0 (patch)
tree11e3fe11465f471ac0f5225245fa46a83e06c3d6 /2configs/home/ham/lib/default.nix
parent41fab215bcd904a2aad898140dcf6f9ba8bbc282 (diff)
ma ham: update
Diffstat (limited to '2configs/home/ham/lib/default.nix')
-rw-r--r--2configs/home/ham/lib/default.nix11
1 files changed, 6 insertions, 5 deletions
diff --git a/2configs/home/ham/lib/default.nix b/2configs/home/ham/lib/default.nix
index 67e8e902d..cf1c32abd 100644
--- a/2configs/home/ham/lib/default.nix
+++ b/2configs/home/ham/lib/default.nix
@@ -14,7 +14,7 @@ in
{
service = "tts.google_say";
data = {
- entity_id = entity;
+ entity_id = entity;
inherit message;
language = "de";
};
@@ -27,10 +27,7 @@ in
#}
{ delay.seconds = 1; }
{ delay = ''
- {% set duration = states.${entity}.attributes.media_duration %}
- {% if duration > 0 %}
- {% set duration = duration - 1 %}
- {% endif %}
+ {% set duration = state_attr("${entity}","media_duration") %}
{% set seconds = duration % 60 %}
{% set minutes = (duration / 60)|int % 60 %}
{% set hours = (duration / 3600)|int %}
@@ -53,6 +50,10 @@ in
inherit message;
entity = "media_player.office";
};
+ bedroom = message: tts {
+ inherit message;
+ entity = "media_player.bedroom";
+ };
};
zigbee.prefix = "/ham/zigbee";
[cgit] Unable to lock slot /tmp/cgit/fd200000.lock: No such file or directory (2)