Skip to content

Commit

Permalink
Merge pull request #55 from BJReplay/Reinstate-Ozzie-state_class-for-…
Browse files Browse the repository at this point in the history
…sensor-total-kwh-forecast

Ozzie reversion
  • Loading branch information
autoSteve authored Jun 25, 2024
2 parents 88bac11 + ae39cdc commit a0f6d87
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 17 deletions.
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -311,11 +311,6 @@ Modified from the great works of
## Changes
v4.0.33
- Revert Ozzie state_class for sensor total kwh forecast by @autoSteve
Full Changelog: https://github.com/BJReplay/ha-solcast-solar/compare/v4.0.32...v4.0.33
v4.0.32
- Bug fix: Independent API use counter for each Solcast account by @autoSteve
- Bug fix: Force all caches to /config/ for all platforms (fixes Docker deployments) #43 by @autoSteve
Expand Down
12 changes: 2 additions & 10 deletions custom_components/solcast_solar/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,16 +293,8 @@ async def async_remove_config_entry_device(hass: HomeAssistant, entry: ConfigEnt
return True

async def async_update_options(hass: HomeAssistant, entry: ConfigEntry):
"""Handle options update. Only reload if any item was changed"""
if any(
entry.data.get(attrib) != entry.options.get(attrib)
for attrib in (DAMP_FACTOR, HARD_LIMIT,KEY_ESTIMATE, CUSTOM_HOUR_SENSOR, CONF_API_KEY)
):
# update entry replacing data with new options
hass.config_entries.async_update_entry(
entry, data={**entry.data, **entry.options}
)
await hass.config_entries.async_reload(entry.entry_id)
"""Reload..."""
await hass.config_entries.async_reload(entry.entry_id)

async def async_migrate_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> bool:
"""Migrate old entry."""
Expand Down
2 changes: 1 addition & 1 deletion custom_components/solcast_solar/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
"iot_class": "cloud_polling",
"issue_tracker": "https://github.com/BJReplay/ha-solcast-solar/issues",
"requirements": ["aiohttp>=3.8.5", "datetime>=4.3", "isodate>=0.6.1"],
"version": "4.0.33"
"version": "4.0.32"
}
2 changes: 1 addition & 1 deletion custom_components/solcast_solar/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
name="Forecast Today",
icon="mdi:solar-power",
suggested_display_precision=2,
#state_class= SensorStateClass.TOTAL,
state_class= SensorStateClass.TOTAL,
),
"peak_w_today": SensorEntityDescription(
key="peak_w_today",
Expand Down

0 comments on commit a0f6d87

Please sign in to comment.