From c4859487231ae982b68bdaf917d2304a453c2a45 Mon Sep 17 00:00:00 2001 From: Joshua Clark Date: Sat, 10 Feb 2024 12:32:55 -0700 Subject: [PATCH] fix yaml lint, camera notifications, stardate - Fix yaml lint in ecobee mode - Fix camera path in notify_pipup - Add silence time for doorbell camera notifications - Add Stardate sensor --- automations.yaml | 2 +- entities/template/sensor/datetime/stardate.yaml | 12 ++++++++++++ entities/template/sensor/ecobee_mode.yaml | 2 +- scripts/notifications/notify_pipup.yaml | 2 +- 4 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 entities/template/sensor/datetime/stardate.yaml diff --git a/automations.yaml b/automations.yaml index 6b89366f..be03790c 100644 --- a/automations.yaml +++ b/automations.yaml @@ -4059,7 +4059,7 @@ title: Stream uri: '{{ stream }}' - action: silence-{{ camera }} - title: Silence + title: Silence ({{ silence_timer }} min) destructive: true - service: webrtc.create_link data: diff --git a/entities/template/sensor/datetime/stardate.yaml b/entities/template/sensor/datetime/stardate.yaml new file mode 100644 index 00000000..0e2eb604 --- /dev/null +++ b/entities/template/sensor/datetime/stardate.yaml @@ -0,0 +1,12 @@ +--- +# The template integration allows creating entities which derive their values +# from other data. This is done by specifying templates for properties of an +# entity, like the name or the state. +# +# https://www.home-assistant.io/integrations/template/ +# https://www.home-assistant.io/integrations/time_date/ +# +sensor: + - name: Stardate + icon: mdi:star + state: '{{ ((as_timestamp(utcnow()) - as_timestamp("2318-07-15 00:12:00.0-05:00")) / 34367.0564 ) | round(1, "floor") | string }}' diff --git a/entities/template/sensor/ecobee_mode.yaml b/entities/template/sensor/ecobee_mode.yaml index dda5573e..b189c792 100644 --- a/entities/template/sensor/ecobee_mode.yaml +++ b/entities/template/sensor/ecobee_mode.yaml @@ -10,7 +10,7 @@ sensor: - name: Ecobee Mode availability: '{{ has_value("climate.ecobee") or has_value("climate.ecobee_cloud") }}' state: | - {% if + {% if state_attr("climate.ecobee", "hvac_action") in ["idle"] and has_value("climate.ecobee_cloud") and is_state_attr("climate.ecobee_cloud", "hvac_action", "fan") diff --git a/scripts/notifications/notify_pipup.yaml b/scripts/notifications/notify_pipup.yaml index 36442ff6..222752b2 100644 --- a/scripts/notifications/notify_pipup.yaml +++ b/scripts/notifications/notify_pipup.yaml @@ -285,7 +285,7 @@ notify_pipup: - service: webrtc.create_link data: link_id: '{{ link_id }}' - entity: '{{ camera }}' + url: rtsp://127.0.0.1:8554/{{ camera.split(".")[1] }} open_limit: 0 time_to_live: 120 # Loop through entity_list