machgo / fellerwiserhomeassistant

Integration to support Feller Wiser in HomeAssistant
21 stars 8 forks source link

Not Unique ID's #11

Open ClaudioFoscan opened 1 month ago

ClaudioFoscan commented 1 month ago

I see some problems with integrating two systems with the same Names in the Lights. is there a Possibility to add a index for the unique ID for each System:

Error-Log: 2024-10-05 21:12:44.441 ERROR (MainThread) [homeassistant.components.light] Platform fellerwiser does not generate unique IDs. ID light-6 already exists - ignoring light.0000de51_1

to fix an additional Index in the ID would solve the Problem:

Instead of "light.light-6" use "light.SystemA-light-6"

cheers Claudio

And By the Way: Thanks for this Work... exactly what i need to get out of the REST-Nightmare ... :-)

ClaudioFoscan commented 1 month ago

The error comes from this part of light.py:

onoff

                else:
                    doUpdate = True
                if doUpdate:
                    for l in lights:
                        if l.unique_id == "light-"+str(data["load"]["id"]):
                            _LOGGER.info("found entity to update")
                            l.updateExternal(data["load"]["state"]["bri"])

If the Feller System returns data["load"]["id"] with the same load and id from the two different Systems, then the error is dropped!

And Yes, if i could, i would change the load and id from the Systems, but there seems to be an error in the Feller Firmware... after finishing the first Installation run with the app, one can change the names after, but the system will not update it somehow ,,, so i'm stuck with a couple of same load names and id thruout my two systems ...