Hello, I ask for your help.
I would like to create a sensor that automatically changes its status from on to off and from off to on every 30 seconds.
can you give me information as precise as possible …
Thank you
I’d suggest https://www.home-assistant.io/integrations/template#trigger-based-template-sensors to create a binary sensor that you turn on every minute, that turns itself off after 30 seconds. Probably something like:
template:
- trigger:
- platform: time_pattern
# This will update every minute
minutes: "*"
binary_sensor:
- name: Flippy boi
state: 'on'
auto_off: '00:00:30'
Really thank you …
if I wanted to change the dashboard when the event occurs, how should I do?
Thanks
What do you mean by that?
I would like to use the same principle to navigate to a different screen with a timing
thk
You want to change the UI? There’s not, that I know of, any built in way of doing that. You’d need something like this custom component to do that.
Sorry, I don’t speak English very well.
I don’t want to change UI, I want to change page in the same UI, in other situations I use NAVIGATE. Thank you
Yes, that custom component is what you need for that.