jheling / freeathome

Free@Home component for Home Assistant
103 stars 37 forks source link

Power Outlet Shown as Light #168

Closed Ruko2010 closed 8 months ago

Ruko2010 commented 8 months ago

Hi, I have a "Schaltaktor 4-fach" to control 4 Power Outlets. But in HA they are shown as lights. So If I tell Siri to turn off all lights in the Living Room, also my Television gets turned off. Can I change this behavior? I already changed the Icon, but did not found a way to change the "light". I'm really new to HA so I hope this is not a dump question 😃.

Thanks for the help IMG_5801 IMG_5800

Ruko2010 commented 8 months ago

@jheling I see, that there is a PR that maybe fixes this. Can you tell me, why it is never merged?

derjoerg commented 8 months ago

Hey, from my perspective ALL switch-actuators from free@home should be created in HA as switches and not as lights as of today because - at the end - nobody can automatically find out if a switch-actuator in F@H is used for a light, a power-outlet or something else. If they are created as switches in HA people can easily use the "switch-as-x" helpers to create the necessary light, fan, ... as used in the specific home

EnricoBilla commented 8 months ago

@derjoerg Yes you are right, in the PR I opened I did the opposite because for my use case it would have been way easier to list all the devices I wanted to be switches rather than the vice versa

derjoerg commented 8 months ago

@EnricoBilla I'm absolutely with you that your solution is much easier (I also have around 15 switches as lights and only 2 switches as power-outlets) BUT to have everything as switch in HA would be - at least from my perspective - the cleaner approach. Any change would not need a restart of HA and it would fully comply with the current HA-way of doing it

Ruko2010 commented 8 months ago

With PR #169 it works like charm. Just have to change the switches which are lights via https://www.home-assistant.io/integrations/switch_as_x/ after the initial setup.