Hey everyone! I’m new to Home Assistant and I’m trying to solve a small issue with my entertainment system. Let me share my experience and maybe get some tips from you all.
So, I have a socket controlled by a switch that powers my TV and other devices. When I hit the ‘Watch TV’ action on my Harmony hub, the switch turns on, and everything works perfectly. But here’s the catch: the Harmony hub doesn’t support delays for turning off, which means when I press ‘Off’, the power cuts out immediately. This doesn’t give my TV enough time to shut down properly, which is a bit annoying.
I’ve heard that Home Assistant can help with delays, so I thought, why not create a virtual switch that turns on instantly but waits a few seconds before turning off? It sounds simple, but I’m not entirely sure how to set this up. I know there are automations and scripts in Home Assistant, but I’m not sure which one to use.
I did some research and found out that I can use a combination of automations and virtual switches. Here’s what I’m thinking: I’ll create a virtual switch in Home Assistant that represents my TV setup. When I press ‘Watch TV’, the virtual switch turns on, and the actual socket follows suit. When I press ‘Off’, the virtual switch will wait for, say, 10 seconds before turning off the socket. This should give my TV enough time to power down gracefully.
But here’s where I’m stuck: how do I create this virtual switch and set up the delay? I know there are integrations like MQTT and Web Core that can help, but I’m not sure which one is the best fit for my setup. I also read about using timers and delays in automations, but I’m not entirely confident about the syntax or the best practices.
Maybe someone in the community has a similar setup and can share their configuration. I’d love to hear how you handle delays in your automation rules, especially for critical devices like TVs or sound systems. Any tips or tricks would be greatly appreciated!
In the meantime, I’ll keep experimenting with different automation flows and see if I can get this working. If I figure it out, I’ll definitely share my solution here. Let’s learn together!
Cheers,
John