Timer (Kitchen Timer) - IN PROGRESS#
I have an old Android phone on the kitchen wall showing a home assistant dashboard.
On it, there should be a timer (countdown clock) that lets me:
input digits on a keypad
Research#
home assistant has a timer helper https://www.home-assistant.io/integrations/timer/
timer progress rianadon/timer-bar-card
another newb wants the same thing and gets redirected to a post without any answers https://community.home-assistant.io/t/how-do-i-get-ha-to-have-a-timer-on-a-card-on-the-dashboard/291150
home assistant has a number input field, but that’s not what I want, because the phone’s number keys on the on-screen keyboard are too small https://www.home-assistant.io/integrations/input_number
people built a timer with sliders for minutes and seconds, but that’s not the UX I am looking for https://community.home-assistant.io/t/countdown-kitchen-timer/93835/41?page=2
this guy is close, but the increment/decrement buttons are too small for my taste https://community.home-assistant.io/t/kitchen-timer-changing-timer-sensor/396289
play a sound: https://companion.home-assistant.io/docs/notifications/notification-sounds/
there’s TTS notifications that read the message text aloud https://companion.home-assistant.io/docs/notifications/notifications-basic/#text-to-speech-notifications
people use VLC to play rtsp stream contents even while the screen is locked https://community.home-assistant.io/t/audio-stream-as-notification-sound-play-on-phone-while-screen-is-off/418158/2
Play a Sound#
At the end of it all, we want to play a sound.
Notification Channels#
https://companion.home-assistant.io/docs/notifications/notifications-basic#notification-channels
This thing tells me to create an automation, but I have no idea what to put into the trigger
block…
Return#
So AFAICT, to play sound:
send a notification with a custom channel
this creates the channel for the companion app
in the companion app’s settings: configure a sound for the channel
I have an existing notification set up for a physical button, so let’s re-use this to validate the hypothesis. Here’s the current button card config:
show_name: true
show_icon: true
type: button
tap_action:
action: call-service
service: notify.mobile_app_sx
target: {}
data:
title: ping
message: via dashboard button
name: ping felix
Edit tap_action.data
to look like this:
data:
title: ping
message: via dashboard button
data:
channel: "kitchen_timer_done"
I took a little while for the notifications to arrive, but after all, the new notification channel appeared! \o/
Now I can configure it to play any sound I have access to on my device.
But a new problem arises: The notification API has rate limits: 500 per day. Ouch. Maybe that’s not the way to go after all! :’(
Maybe I can use https://companion.home-assistant.io/docs/notifications/notification-local
Create a Timer#
Settings > Devices & Services > Helpers: