here a template action sensor:
- trigger:
- platform: time_pattern
minutes: /5
seconds: "30"
action:
- service: calendar.get_events
data:
duration:
hours: 450
minutes: 0
seconds: 0
start_date_time: "{{ today_at() }}"
target:
entity_id: calendar.birthdays
response_variable: scheduled_birthdays
sensor:
- name: Calendar Scheduled Birthdays
unique_id: calendar_scheduled_Birthdays
state: "{{ scheduled_birthdays.events | count() }}"
attributes:
scheduled_events: "{{ scheduled_birthdays.events }}"
icon: mdi:calendar'
my sensor : sensor.calendar_scheduled_birthdays → state 0 ??
in developper tools(service):
service: calendar.get_events
data:
duration:
hours: 450
minutes: 0
seconds: 0
start_date_time: "{{ today_at() }}"
target:
entity_id: calendar.birthdays
response_variable: scheduled_birthdays
Answer:
calendar.birthdays:
events:
- start: "2023-12-14T08:00:00+01:00"
end: "2023-12-14T09:00:00+01:00"
summary: Laurent
description: anniversaire
- start: "2023-12-15T08:00:00+01:00"
end: "2023-12-15T09:00:00+01:00"
summary: Camille
description: anniversaire
problem with my sensor ???
i can’t find the solution
Thanks