Skip to content

Fix sensor platform setup when energy sensor options are missing - #461

Open
SAY-5 wants to merge 1 commit into
mill1000:mainfrom
SAY-5:fix-sensor-missing-energy-options
Open

Fix sensor platform setup when energy sensor options are missing#461
SAY-5 wants to merge 1 commit into
mill1000:mainfrom
SAY-5:fix-sensor-missing-energy-options

Conversation

@SAY-5

@SAY-5 SAY-5 commented Aug 2, 2026

Copy link
Copy Markdown

Fixes #459. When a config entry's options lack the energy_sensor/power_sensor keys, _get_energy_config crashed with AttributeError and took down the whole sensor platform, including the temperature sensors. Fall back to the default BCD format and 1.0 scale instead, with a regression test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sensor platform crashes with 'NoneType' object has no attribute 'get' when energy_sensor/power_sensor options are set

1 participant