peribeir / homeassistant-rademacher

This custom integration provides access to Rademacher Devices connected to a HomePilot (or Start2Smart) bridge.
GNU General Public License v3.0
58 stars 12 forks source link

Request: activate/deactivate scene #123

Open HLueken opened 1 month ago

HLueken commented 1 month ago

I have scenes defined which I activate/deactivate in certain cases. Would it be possible to add this functionality to the Rademacher integration?

peribeir commented 1 week ago

Hi, since version 2.1.0 I added support for scenes. Unfortunately I cannot test it since I have the smaller start2smart which doesn't support scenes. But can you check in home assistant if the scenes you have defined in Home pilot are shown in HA? They should have the prefix Homepilot.

HLueken commented 1 week ago

Hi, Scenes are available in HA, however how can I activate/deactivate a scene? Example: I have a scene Vacation (to change the blinds randomly over the day). I want to activate the scene before vacation and deactivate it after vacation. I solved it via REST services to Homepilot, however it would be nicer to use your integration.

peribeir commented 1 week ago

Activation is available in HA so it should be possible either in the GUI (by going to Automations & Scenes -> Scenes and pressing Activate) or in automations by choosing Scene action and Activate and choose scene. Can you confirm that this works?

Deactivation is not currently possible because HA scenes are actually stateless. I didn't even know that scenes could be deactivated in HP. But I think we can overcome this, I can add all HP scenes as switches in HA. This way you can switch on (activate) or off (deactivate).

At this point, I don't know how to deactivate scenes using the API, can you provide me the json used in the REST request to deactivate a scene?

HLueken commented 1 week ago

This is how I defined the REST: IMG_0964

HLueken commented 1 week ago

I guess there is a misunderstanding about the meaning of „activate“. I do not mean execute. I mean more activate like enable, deactivate like disable. The definition of a scene allows to disable the scene.

executing a scene is already possible in your integration.

IMG_0965

peribeir commented 1 week ago

Ok, that's clear now. Then I'll leave scenes as they are. I'll add a switch for each scene so that you can activate/deactivate them.