hcpy2-0 / hcpy

Python tool to talk to Home Connect appliances over the local network (no cloud required)
108 stars 17 forks source link

Version 0.1.3 breaking change #88

Closed saveriol closed 1 month ago

saveriol commented 2 months ago

Hello,

86 change in hc2mqtt.py line 154:

for device in devices: - mqtt_topic = mqtt_prefix + device["name"] + mqtt_topic = mqtt_prefix + device["host"]

breaks state topic subscription because you were using name instead of host, as seen in wiki examples https://github.com/hcpy2-0/hcpy/wiki/HomeAssistant , ie:

state_topic: "homeconnect/hood/state"

which needs to be changed to

state_topic: "homeconnect/hood_hostname/state"

to receive updates.

Now it's not exacly clear when to use host and when to use device name. For example, this works:

command_topic: "homeconnect/hood/set"

this won't:

command_topic: "homeconnect/hood_hostname/set"

Is "state_topic" the only one where you need to specify the hostname?

Todo

Meatballs1 commented 2 months ago

@jamesremuscat is the change from name to host important for the auto discovery or can this revert back to name?

jamesremuscat commented 2 months ago

@Meatballs1 I think this is OK to be reverted, with one caveat: I'm not sure if Home Connect prevents a user having multiple devices with the same name, but if a user does that it's their own fault things get confused :wink:

saveriol commented 1 month ago

Yesterday I proposed #93 to revert the change to host.