I recently came across an interesting challenge that I thought might be worth sharing and discussing with the community. I’ve been exploring ways to integrate my Shelly 2PM devices to automate my home more efficiently, and one idea that’s been on my mind is using the physical switch on the Shelly 2PM to control my shutters.
Here’s the scenario: I’d like my shutters to automatically close or open when I hold the physical up/down button on the Shelly 2PM for more than 2 seconds. I already use the Shellys to control the shutters from Home Assistant (HA) using automations, but I want to add this physical interaction layer as well.
So, my question is: how can I read the input from the physical button in HA and trigger the shutter automation? I’ve been experimenting with different configurations, but I’m not quite there yet. Any advice or tips from the community would be greatly appreciated!
For those who might be interested, here’s a quick overview of my current setup:
- I have a Shelly 2PM connected to my shutter motor.
- I’ve set up basic automations in HA to open/close the shutters via voice commands or the HA app.
- I’d like to enhance this by adding the physical button interaction.
If anyone has experience with similar setups or knows how to read the physical button state from the Shelly 2PM, I’d love to hear your thoughts. Let’s brainstorm together and see how we can make this work!
Some initial thoughts:
- I believe the Shelly 2PM sends state updates when the physical button is pressed. Maybe I can monitor these state changes in HA.
- I could set up a condition in an automation that triggers only if the button is held down for a certain duration.
- I might need to use a script or a lambda function to measure the duration of the button press.
Looking forward to hearing your ideas and experiences! Let’s make this happen! ![]()