StephanJoubert / home_assistant_solarman

Home Assistant component for Solarman collectors used with a variety of inverters.
Apache License 2.0
508 stars 191 forks source link

Show HEX Modbus addresses too in the logs #495

Closed virtualdj closed 4 months ago

virtualdj commented 5 months ago

This change allows to see the Modbus addresses in hex format too in the logs, so you can more easily spot errors in the inverter YAML definition file (which normally uses register addresses in hex format).

The log entries will change from this:

2024-01-21 13:31:31.174 WARNING (SyncWorker_1) [custom_components.solarman.solarman] Querying [1028-1051] failed with exception [Empty: ]

To this:

2024-01-21 13:31:31.174 WARNING (SyncWorker_1) [custom_components.solarman.solarman] Querying [1028-1051 (0x0404-0x041B)] failed with exception [Empty: ]