Skip to content

Commit

Permalink
fix yaml lint, camera notifications, stardate
Browse files Browse the repository at this point in the history
- Fix yaml lint in ecobee mode
- Fix camera path in notify_pipup
- Add silence time for doorbell camera notifications
- Add Stardate sensor
  • Loading branch information
zanix committed Feb 10, 2024
1 parent b9741fb commit 46ccd97
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 3 deletions.
2 changes: 1 addition & 1 deletion automations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
15 changes: 15 additions & 0 deletions entities/template/sensor/datetime/stardate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
# 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: >-
{% set doty = strptime('12/31/' ~ now().year, '%m/%d/%Y').timetuple().tm_yday | float %}
{% set uu = as_timestamp(utcnow()) %}
{{ ((1000 * ((uu / 86400 / doty) + 25)) + ((uu / 86400) % 1)) | round(2, "floor") }}
2 changes: 1 addition & 1 deletion entities/template/sensor/ecobee_mode.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion scripts/notifications/notify_pipup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 46ccd97

Please sign in to comment.