Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Architecture] Allow multiple entities per device #223

Closed
iMicknl opened this issue Aug 12, 2020 · 9 comments · Fixed by #425
Closed

[Architecture] Allow multiple entities per device #223

iMicknl opened this issue Aug 12, 2020 · 9 comments · Fixed by #425
Labels
breaking Breaking Change enhancement New feature or request help wanted Extra attention is needed

Comments

@iMicknl
Copy link
Owner

iMicknl commented Aug 12, 2020

Is your feature request related to a problem? Please describe.
Currently, we only have one entity per discovered Somfy TaHoma device. However, looking at some of the devices, there are more interesting states and/or actions to take, which we put now in attributes.

Looking at PR's to core, I get the feeling that the attributes part is used less and less and should not be used to store everything.

For example, looking at some sensors, there are multiple power states and the same for some security devices.

Describe the solution you'd like
Rewrite part of the integration to dynamically allow the creation of multiple entities per device.

Additional context
Example of a Z-Wave device, with multiple entities. Some less frequent used entities are hidden by default.
Screenshot 2020-08-12 at 17 44 53

@iMicknl iMicknl added enhancement New feature or request breaking Breaking Change labels Aug 12, 2020
@tetienne
Copy link
Collaborator

So you want to convert some Somfy attribute to hass entity_id?

@iMicknl
Copy link
Owner Author

iMicknl commented Aug 12, 2020

@tetienne not sure yet how to do it technically. Opened this issue for tracking, since I faced it a few times in my last work on the integration.

But in the end, it would be good to understand if for example battery state and other states should be in their own entity. Good one to discuss on Discord.

Open for any technical architectures.

@PoVPoV29
Copy link

It's should be perfect to manager detector :
Capture

@github-actions
Copy link

'There hasn't been any activity on this issue recently. Is this issue still present?
Please make sure to update to the latest Home Assistant version and version of this integration to see if that solves the issue. Let us know if that works for you by adding a comment 👍.
This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.'

@iMicknl
Copy link
Owner Author

iMicknl commented Apr 18, 2021

I started on this one, however there is a lot of work to be done. And we need to rethink how we currently init the sensor / binary sensor platform.

Sneak peek:
Screen Shot 2021-04-18 at 18 31 39

hlrrwifi:RoomTemperatureState: 17

#376 (comment)

@iMicknl
Copy link
Owner Author

iMicknl commented Jul 14, 2021

@Hankey71 the version below should add a sensor for the expected number of showers.
@tillstaff the version below should add a sensor for the speed of each motors (inlet and outlet).

Could you give https://github.com/iMicknl/ha-tahoma/archive/refs/heads/feature/add_secondary_sensors.zip a try? Extract this file and place custom_components/tahoma in your custom_components folder. Let me know how it works.

@Hankey71
Copy link

Hi @iMicknl
Thank you again for all the work you do on this integration!
I just tested this version with the number of showers and it's perfect!
But I think you had already tried with my water heater because on your screen print it looks like my data from my water heater!
Thank you !

@iMicknl
Copy link
Owner Author

iMicknl commented Jul 15, 2021

Great to hear, @Hankey71! And the screenshot is from a long time ago, but I guess I took it while developing via your account. 😄

@Hankey71
Copy link

Yes, no worries for the account! Now I can have my three cards on lovelace, the towel dryer, the three living room radiators (together) and the water heater! Perfect !
Presse-papiers-1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Breaking Change enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants