knudsvik / EnergyScore

Custom Integration for Home Assistant to score how energy is utilized based on price point
MIT License
36 stars 4 forks source link

Improve config flow handling of unique id #71

Closed knudsvik closed 1 year ago

knudsvik commented 1 year ago

There are two async methods to set and check unique id in a config flow step, but if implemented as-is it will be over written by the class instantiation. See here for docs.

Necessary if an options flow is to be created, e.g. changing the entities (will change the unique ID per now) or future options.

knudsvik commented 1 year ago

PR #85 was to fix this, but introduced an UID = None in production for some reason :( Need to work a bit more on why. Have reimplemented the old way of doing this (as it was before this PR), but the functionality is still in the code, just commented out in the sensor class instanciation.

knudsvik commented 1 year ago

Fixed in PR #85