Skip to content

Add sensor_unit configuration support for HomeAssistant forecasts#242

Merged
MaStr merged 1 commit intomainfrom
fix-241
Jan 2, 2026
Merged

Add sensor_unit configuration support for HomeAssistant forecasts#242
MaStr merged 1 commit intomainfrom
fix-241

Conversation

@MaStr
Copy link
Owner

@MaStr MaStr commented Jan 2, 2026

  • Introduced sensor_unit parameter in ForecastConsumptionHomeAssistant to allow explicit unit configuration ('auto', 'Wh', 'kWh').
  • Updated consumption.py and forecast_homeassistant.py to handle sensor_unit logic.
  • Enhanced batcontrol_config_dummy.yaml with sensor_unit documentation.
  • Added comprehensive tests for sensor_unit handling in test_consumption_factory.py and test_homeassistant.py.

Closed #241

- Introduced sensor_unit parameter in ForecastConsumptionHomeAssistant to allow explicit unit configuration ('auto', 'Wh', 'kWh').
- Updated consumption.py and forecast_homeassistant.py to handle sensor_unit logic.
- Enhanced batcontrol_config_dummy.yaml with sensor_unit documentation.
- Added comprehensive tests for sensor_unit handling in test_consumption_factory.py and test_homeassistant.py.

Closed #241
@MaStr MaStr requested a review from Copilot January 2, 2026 18:38
@MaStr MaStr self-assigned this Jan 2, 2026
@MaStr MaStr added the bug Something isn't working label Jan 2, 2026
@MaStr MaStr merged commit ef80ed8 into main Jan 2, 2026
14 checks passed
@MaStr MaStr deleted the fix-241 branch January 2, 2026 18:39
@MaStr MaStr review requested due to automatic review settings January 2, 2026 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crash on startup: ConnectionClosedError (message too big) when fetching Home Assistant states

1 participant