Skip to content
This repository has been archived by the owner on Jul 12, 2023. It is now read-only.

Commit

Permalink
update to async_write_ha_state and add deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
mjmeli committed May 4, 2023
1 parent 8ee4554 commit 436eb6c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ This is a custom integration for [Home Assistant](https://www.home-assistant.io/

This integration leverages the [`pyduke-energy`](https://github.com/mjmeli/pyduke-energy) library, also written by me, to pull data. This API is _very_ unofficial and may stop working at any time (see [Disclaimer](https://github.com/mjmeli/pyduke-energy#Disclaimer)).

## IMPORTANT Pre-Requisites! (Please Read)
## IMPORTANT - Deprecation Warning

Duke Energy is shutting down the Gateway pilot program at the end of June. This integration will stop functioning and will be deprecated.

## Pre-Requisites! (Please Read)

You are required to have a Duke Energy Gateway connected to your smartmeter for this to work. This is a **separate** device than your Smart Meter and is provided by an invitation only program at the moment. If you don't know what this is, then you probably don't have it. This integration does not support any other method of retrieving data (see [Gateway Requirement](https://github.com/mjmeli/pyduke-energy#gateway-requirement)).

Expand Down
2 changes: 1 addition & 1 deletion custom_components/duke_energy_gateway/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
"iot_class": "cloud_polling",
"issue_tracker": "https://github.com/mjmeli/ha-duke-energy-gateway/issues",
"requirements": ["pyduke-energy==1.0.5"],
"version": "0.1.4"
"version": "0.1.5"
}
2 changes: 1 addition & 1 deletion custom_components/duke_energy_gateway/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ async def async_added_to_hass(self):
async def async_on_new_measurement(measurement: RealtimeUsageMeasurement):
_LOGGER.debug("New measurement received: %f", measurement.usage)
self._state = measurement.usage
await self.async_update_ha_state()
await self.async_write_ha_state()

# Attach subscriber callback
self._coordinator.async_realtime_subscribe_to_dispatcher(
Expand Down

0 comments on commit 436eb6c

Please sign in to comment.