-
-
Notifications
You must be signed in to change notification settings - Fork 7
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 support to add multiple devices #13
Comments
i.e. from slugify import slugify
ident = f"{mac}-{slugify(name, separator='_'}" |
@quazzie: your code really looks amazing, I think I might be able to wrap multiple devices together myself.. My idea is to add a helper function for tellstick-plugin-mqtt-hass/hass_client/Client.py Lines 414 to 437 in 8b3d33a
What do you think of it? |
Thanks! Sorry i have not had time to look at this. I tried you pr on my dev tellstick, seems to work as you describe. Before i could just go to devices - tellstick and get all my sensors/devices. |
Do you want me to make this optional via configuration? |
This is not right: homeassistant/<type 'type'>/telldus/hub/config {"availability_topic": "telldus/telldus/available", "name": "telldus", "payload_on": "online", "device": {"sw_version": "1.3.1", "name": "telldus", "identifiers": "ACCA5401B5EA", "connections": [["mac", "AC:CA:54:01:B5:EA"]], "model": "tellstick-znet-lite-v2", "manufacturer": "Telldus Technologies"}, "device_class": "connectivity", "state_topic": "telldus/telldus/available", "payload_off": "offline", "unique_id": "ACCA5401B5EA_hub"} Hm, the hierarchy does not seem to work either.. |
MQTT_Homeassistant-0.85.1.zip |
I do think this is the intended way Devices should work. There is hierarchy but it is not shown in the frontend (yet). What do you think about setting Also, the |
Vi kanske ska skippa min unique_id ändring också, det kommer ju ändra alla devices och bli en "Breaking change" på gamla entiteter. |
I've updated the code in my PR.. |
The way Home-Assistant works with devices is the following:
via_device
property Add support for 'via_hub' for device_info home-assistant/core#19454).That means that in the Telldus environment each sensor should be its own device and this device should be nested under the Tellstick-device.
This is how the sensor "Vit Inne" in the Tellstick-live integration (Mjövik is the name of my Tellstick-Lite):
I therefore suggest that this plugin sends a
binary_sensor
that represents the Tellstick like this:homeassistant/binary_sensor/telldus/ACCA5401B5EA/config
And that this entities (posted to
homeassistant/sensor/telldus/6_1_0/config
,homeassistant/sensor/telldus/6_2_0/config
&homeassistant/sensor/telldus/ACCA5401B5EA_6_battery/config
:Are changed to:
I don't know if "model" & "manufacturer" is available at the plugin level but perhaps "model" could represent the type of device.
The text was updated successfully, but these errors were encountered: