Update pypoint to use async http requests (#41546)
* Remove domain after entities * Add support for async http-requests * Fix, handle network issues (update _is_available status) * Fix missing await for alarm_arm * Fix alarm status * Update tests to async * Bump pypoint version * Fix doc string * Apply suggestions from code review, remove pylint disable * Fix black
This commit is contained in:
1 parent
32204821c1
commit
8bdc824b6c
8 files changed
+49
-46
No files matched your search
@@ -57,13 +57,11 @@ class MinutPointSensor(MinutPointEntity):
|
||||
|
||||
async def _update_callback(self):
|
||||
"""Update the value of the sensor."""
|
||||
_LOGGER.debug("Update sensor value for %s", self)
|
||||
if self.is_updated:
|
||||
_LOGGER.debug("Update sensor value for %s", self)
|
||||
self._value = await self.hass.async_add_executor_job(
|
||||
self.device.sensor, self.device_class
|
||||
)
|
||||
self._value = await self.device.sensor(self.device_class)
|
||||
self._updated = parse_datetime(self.device.last_update)
|
||||
self.async_write_ha_state()
|
||||
self.async_write_ha_state()
|
||||
|
||||
@property
|
||||
def icon(self):
|
||||
|
||||
Reference in new issue
Block a user