You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently developping a custom component for home assistant that handles some of the Eltako's products , which are based on EnOcean.
More especially :
F4SR14 : non-dimmable light
FUD14 : dimmable light
FSB14 : cover
Because the F4SR14 is not dimmable, the message waited by the actuator is not the same and does not work with the enocean component.
My component is mostly based on this repo and the way I handled it is by creating classes for each type of light ( --> is class inheritance ) :
F4SR14Entity --> EltakoLightEntity --> EltakoEntity, LightEntity
FUD14Entity --> EltakoLightEntity --> EltakoEntity, LightEntity
# the following is not done yet
FSB14Entity --> EltakoCoverEntity --> EltakoEntity, CoverEntity
F4SR14Entity and FUD14Entity set the properties correctly (ColorMode.ONOFF, ColorMode.BRIGHTNESS, ...) and implement the turn_off, turn_on and value_changed methods.
Based on a device_class option in the config, the right class is used.
Implementing all of this in another component is not the best solution :
I can't use any of other EnOcean devices because of multiples uses of dongle
A certain part of the component is the same as EnOcean
My tought :
Can't we add a "device_class" config for each device type (light, cover, ...) so that we can specify which class to use ?
Adding more systems or devices to the code will be easier : simply add new classes.
What do you think ?
Vincent
The text was updated successfully, but these errors were encountered:
Hi @vincentdieltiens !
Sorry for the very late answer, somehow github does not notify me, very annoying :/
Yep, looks like a good idea. So at the end it would look like the sensor.py file right ?
That reminds me I need to update the readme as this library contains the teach in logic now.
Hi! There is another new enocean implementation via mqtt for HA that looks very promising (and works as an addon). Maybe you like to team up, so that we can get the Dolphin rolling on HA? :) https://github.com/mak-gitdev/HA_enoceanmqtt
Hi! There is another new enocean implementation via mqtt for HA that looks very promising (and works as an addon). Maybe you like to team up, so that we can get the Dolphin rolling on HA? :) https://github.com/mak-gitdev/HA_enoceanmqtt
That looks really cool, but I already talked to the owner of the project and I'm not sure that adding a layer of complexity will help.
I would rather rework a new enocean python library and then a cleaner integration in HA. In my sens this is by fare less complex and futur proof. But that's just my opinion 🙌
Hi,
I'm currently developping a custom component for home assistant that handles some of the Eltako's products , which are based on EnOcean.
More especially :
Because the F4SR14 is not dimmable, the message waited by the actuator is not the same and does not work with the enocean component.
My component is mostly based on this repo and the way I handled it is by creating classes for each type of light ( --> is class inheritance ) :
F4SR14Entity
andFUD14Entity
set the properties correctly (ColorMode.ONOFF
,ColorMode.BRIGHTNESS
, ...) and implement theturn_off
,turn_on
andvalue_changed
methods.Based on a
device_class
option in the config, the right class is used.Implementing all of this in another component is not the best solution :
My tought :
Can't we add a "device_class" config for each device type (light, cover, ...) so that we can specify which class to use ?
Adding more systems or devices to the code will be easier : simply add new classes.
What do you think ?
Vincent
The text was updated successfully, but these errors were encountered: