Energyzero - Add sensor entity to pick best hours (#98916)

* Add entity to pick best hours

* Add entity also to diagnostics

* Remove string translation that doesn't exists

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
This commit is contained in:
Klaas Schoute 2023-08-23 23:02:19 +02:00 committed by GitHub
parent 816f834807
commit d8f0c090cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 88 additions and 4 deletions

View file

@ -50,6 +50,7 @@ async def async_get_config_entry_diagnostics(
"highest_price_time": coordinator.data.energy_today.highest_price_time,
"lowest_price_time": coordinator.data.energy_today.lowest_price_time,
"percentage_of_max": coordinator.data.energy_today.pct_of_max_price,
"hours_priced_equal_or_lower": coordinator.data.energy_today.hours_priced_equal_or_lower,
},
"gas": {
"current_hour_price": get_gas_price(coordinator.data, 0),