Home Assistant sensor
Home Assistant’s RESTful integration turns any JSON API into sensors. This one counts the episodes airing today for the shows you follow.
Key: calendar:read.
-
Create the key in Settings › Integrations, then store it in
secrets.yaml, with itsBearerprefix:loomkeep_api_key: "Bearer lk_…" -
Add the sensor to
configuration.yaml:rest:- resource: https://loomkeep.app/api/v1/calendar?days=1headers:Authorization: !secret loomkeep_api_keyscan_interval: 1800 # 30 minutessensor:- name: Loomkeep episodes todayunique_id: loomkeep_episodes_todayicon: mdi:television-playvalue_template: "{{ value_json | length }}" -
Restart Home Assistant:
sensor.loomkeep_episodes_todayappears.
Announce them
Section titled “Announce them”An automation can say it out loud when you get home, for instance:
automation: - alias: Announce today's episodes triggers: - trigger: state entity_id: person.me to: home conditions: - condition: numeric_state entity_id: sensor.loomkeep_episodes_today above: 0 actions: - action: tts.speak target: entity_id: tts.home_assistant_cloud data: media_player_entity_id: media_player.living_room message: >- {{ states('sensor.loomkeep_episodes_today') }} new episodes are out today.Replace the person, the speech service and the speaker with yours.
Without a key
Section titled “Without a key”To list the episodes in Home Assistant’s calendar rather than count them, subscribe to your calendar link with the remote calendar integration: no key needed.