Hey,
TLDR: (I think) I would like to count up a variable every time an instance turns on. Where is an example automation which I can use as inspiration?!
If you dont understand my blab please tell me. Its not easy to explain this mess…
Long story:
TV and subwoofer are seperate entities in Home Assistant.
Subwoofer controlled by Shelly, which bridges contacts of a stupid momentary button. Shelly turns itself off after 1 second to mimic the push of the button.
I cant put shelly to the main AC of the sub. The stupid sub always starts in standby-mode and needs the buttonpush to activate.
Cant measure, if bass is already on or not. No sensor for that…
My workaround now is
If TV turns on/off
turn on Sub. (which triggers the momentary switch, to toggle the state of the bass)
But
- if I hear music over the HiFi system and start the TV it turns the sub off.
- if I forget to turn that off the Sub wastes around 80 Watts of power all night.
I would like to count the Shelly triggers, so I can calculate, if sub is on or off…
How would I do this? (Shelly turned on 3 times today; On-Off-On → sub is On)
Bonus points if you could give me an idea, how to let Alexa override this state.
Example: Because of reasons the state of the sub is out of sync with the real state. Can an Alexa command like “Set sub state to ON” correct for this?
Would it be better to buy another shelly and throw it to the sub mains voltage in addition to the pushbutton shelly?
Cheers,