-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
Add gateways to Device Registry #333
Conversation
Yes it was just cosmetic. For the moment it's just an useless device 😅 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have to add a via_hub attribute to the device info too.
Thanks, I was just looking into this. But I can not seem to find a relation between the hub and the devices via the TaHoma API... Another thought (for a new PR) is to add sensors to the hub, for example reflecting |
Perhaps because there is no need for them to return a parent id. We can assume that for each device in the response the parent is the only hub available. |
is it really necessary? isn't it cluttering the UI with useless info? |
You won't see it much in the UI, but it will allow us to also detect if we already have the integration configured for autodiscover. Autodiscover is able to receive the ID of the gateway, via the hostname. |
Done! However, I don't see any mention of it in the interface, is this property still required? |
32ca9af
to
7661d2c
Compare
Apparently it is |
Seriously? Why nobody told me that's was wrong?! |
@Pol2Tls, @browetd; could you give this branch a try? I would like to understand if it works with Cozytouch as well. https://github.com/iMicknl/ha-tahoma/archive/feature/add_gateway.zip |
@iMicknl How should we install this "add_gateway.zip" ? What I did, I uninstalled the previous integration, I copied the tahoma directory to custom components, restarted HA, redefined the user/password for cozytouch... but for me nothing changed versus previous version... I will try again tomorrow ... UPDATE SATURDAY MORNING: Log file:
|
Thanks @browetd. This change was indeed not for the climate entity, hopefully we will be able to spend some time on that soon. Thanks for testing :). Other news;
For Cozytouch (without sub_type) I need to make a change in python-tahoma-api first, before merge. |
|
||
gateway_model = ( | ||
beautify_name(gateway.sub_type.name) | ||
if isinstance(gateway.sub_type, Enum) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can be something else than an Enum?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately it can be something else... (https://github.com/iMicknl/python-tahoma-api/blob/78587f4f9547b2621a1123817efb2f2a66f21d9b/pyhoma/models.py#L394-L402).
However, maybe we should address it there. And throw a None + warning that we don't have the value in Enum.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In Pyhoma the code looks good. But here it sounds weird :S
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can also do this in beautify_name()
, but I would prefer to just pass a string to that to keep is reusable.
commit 2657d9f Author: Mick Vleeshouwer <[email protected]> Date: Sun Jan 31 22:23:53 2021 +0100 Add gateways to Device Registry (#333) Co-authored-by: Vincent Le Bourlot <[email protected]> commit 323ac9d Author: Mick Vleeshouwer <[email protected]> Date: Sun Jan 31 21:55:44 2021 +0100 Update README to reflect support of other OverKiz hubs (#363)
commit 2657d9f Author: Mick Vleeshouwer <[email protected]> Date: Sun Jan 31 22:23:53 2021 +0100 Add gateways to Device Registry (#333) Co-authored-by: Vincent Le Bourlot <[email protected]> commit 323ac9d Author: Mick Vleeshouwer <[email protected]> Date: Sun Jan 31 21:55:44 2021 +0100 Update README to reflect support of other OverKiz hubs (#363)
First try to add gateways to the device registry as well. I saw you did do this for the Somfy integration, @tetienne. Any specific reason for it? (or just cosmetic).