Small changes

fixed power switch

Revert "fixed power switch"

This reverts commit a1a2b04444a10c9dba9731ea62571ff20b56ede1.

new HON

switch

stable
This commit is contained in:
Vadym Melnychuk
2026-03-23 12:17:06 +02:00
parent f66bd14ed1
commit e81b1503de
12 changed files with 48 additions and 52 deletions
+4 -4
View File
@@ -21,10 +21,10 @@ from homeassistant.const import (
UnitOfTime,
UnitOfTemperature,
)
from homeassistant.core import callback
from homeassistant.core import HomeAssistant as HomeAssistantType, callback
from homeassistant.helpers.entity import EntityCategory
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.typing import HomeAssistantType
from pyhon.attributes import HonAttribute
from . import const
from .const import DOMAIN
@@ -903,7 +903,7 @@ class HonSensorEntity(HonEntity, SensorEntity):
self._attr_native_value = 0
self._attr_native_value = value
if update:
self.async_write_ha_state()
self.schedule_update_ha_state()
class HonConfigSensorEntity(HonEntity, SensorEntity):
@@ -931,4 +931,4 @@ class HonConfigSensorEntity(HonEntity, SensorEntity):
value = get_readable(self.entity_description, value)
self._attr_native_value = value
if update:
self.async_write_ha_state()
self.schedule_update_ha_state()