jheling / freeathome

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

Light or cover groups not found #94

Open deb42 opened 3 years ago

deb42 commented 3 years ago

I cannot find the light or cover groups in Home Assistant which are created in Bush Jaeger. This feature is not stated in the discription but it would be cool to get clearification whether it's really not working or I missed some sort of configuration.

Thank you in advance!

jheling commented 3 years ago

hello, there is no support for these groups yet. I was wondering; how would you expect these groups to appear in Home Assistant? As a single light or single cover?

deb42 commented 3 years ago

Sorry for the late response. For lights I would suggest a similar approach as the deCONZ add-on provides. There, light-groups appear as a singe light which handles all lights in this group similarly. Thus, if you turn on the group, all lights in this group are turned on. Or if you change the brightness of the group, all lights in the group get the same brightness. Covers could work the same way.

miezie commented 3 years ago

Why not use the group functionality that home assistant already has... that’s the way to go.

guerda commented 1 year ago

I would like to see the groups for lights and covers as well.

Why not use the group functionality that home assistant already has... that’s the way to go.

One difference is the delay. If I define a group in HA, the free@home AP is called (at least) once for each device. If the group is addressed, this is done within ~ one call.

guerda commented 1 year ago

I looked more into the groups. It seems that groups are defined like this in the backup:

Cover group: <device maxAPDULength="31" iconId="4001" functionId="4001" nameId="0167" softwareId="0003" softwareVersion="0.3" deviceId="4001" deviceFlavor="00" domainAddress="BAE7" type="group" profile="0000" serialNumber="FFFF40010002" commissioningState="ready" copyId="0">

Light group: <device maxAPDULength="31" iconId="4000" functionId="4000" nameId="0166" softwareId="0002" softwareVersion="0.2" deviceId="4000" deviceFlavor="00" domainAddress="BAE7" type="group" profile="0000" serialNumber="FFFF40000001" commissioningState="ready" copyId="0">

That means that here in this file https://github.com/jheling/freeathome/blob/master/custom_components/freeathome/fah/pfreeathome.py#L371 , the device_type group would be missing

Further more, it seems that they "feel" like a single light or cover. Would it be an idea to just add them as a single light or cover for a first try?

Tho85 commented 1 year ago

I've done a first implementation for light and dimmer groups in #159, feel free to try the code there and let me know if it works. Light groups are exported as single lights.

guerda commented 1 year ago

I will check it out asap and give you feedback.

guerda commented 1 year ago

I tested your branch with a light group (binary, not a dimmer) and it worked smoothly. Reloading the integration automatically detected the light groups and I was able to switch them on and off. The delay is not any different than with the free@home app.

I also tested dimming light groups and those work, too.

Great work! Looking forward for the integration!

guerda commented 1 year ago

Thank you for merging this. It is not completely resolved as cover groups are not included yet.

Tho85 commented 1 year ago

Right, reopened until this is fixed

guerda commented 1 year ago

Hi @Tho85 ! Do you need any help with implementing the cover groups?