Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reintroduce unique_id for Netatmo sensor (#18774)
* netatmo: make module type identification more consistent For the interpretation of voltage values the different types of netatmo modules need to be distinguished. This is currently done by selecting the second character of the modules '_id'. The _id-field actually contains a mac address. This is an undocumented way of identifying the module_type. The netatmo API also delivers a field called 'type' which provides a more consistent way to differentiate the fields. This commit introduces a differentiation which uses this provided type. This should improve readability. Also the field module_id is renamed to module_type which should better resemble what it actually represents. * netatmo: reintroduce unique_id using actual module mac address Each netatmo module features a unique MAC-Address. The base station uses an actual assigned MAC Address it also uses on the Wifi it connects to. All other modules have unique MAC Addresses which are only assigned and used by Netatmo on the internal Wireless-Network. All theses Addresses are exposed via the API. So we could use the combination MAC-Address-Sensor_type as unique_id. In a previous commit this had already been tried but there was a misunderstanding in what the 'module_id' represented. It was actually only a module_type representation so it clashed when two modules of the same type where used. * Netatmo: fixed line length
- Loading branch information