deCONZ - Revert from using disabled_by when setting options (#31446)
* Revert from using disabled_by when setting options * Remove signalling for changed options * Evaluate allow group option earlier when adding a group
This commit is contained in:
1 parent
3801d5adf4
commit
fce9697591
6 files changed
+30
-88
No files matched your search
@@ -19,7 +19,7 @@ from homeassistant.helpers.dispatcher import (
|
||||
from .const import ATTR_DARK, ATTR_ON, NEW_SENSOR
|
||||
from .deconz_device import DeconzDevice
|
||||
from .deconz_event import DeconzEvent
|
||||
from .gateway import DeconzEntityHandler, get_gateway_from_config_entry
|
||||
from .gateway import get_gateway_from_config_entry
|
||||
|
||||
ATTR_CURRENT = "current"
|
||||
ATTR_POWER = "power"
|
||||
@@ -37,7 +37,6 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
|
||||
|
||||
batteries = set()
|
||||
battery_handler = DeconzBatteryHandler(gateway)
|
||||
entity_handler = DeconzEntityHandler(gateway)
|
||||
|
||||
@callback
|
||||
def async_add_sensor(sensors, new=True):
|
||||
@@ -65,11 +64,12 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
|
||||
new
|
||||
and sensor.BINARY is False
|
||||
and sensor.type not in Battery.ZHATYPE + Thermostat.ZHATYPE
|
||||
and (
|
||||
gateway.option_allow_clip_sensor
|
||||
or not sensor.type.startswith("CLIP")
|
||||
)
|
||||
):
|
||||
|
||||
new_sensor = DeconzSensor(sensor, gateway)
|
||||
entity_handler.add_entity(new_sensor)
|
||||
entities.append(new_sensor)
|
||||
entities.append(DeconzSensor(sensor, gateway))
|
||||
|
||||
if sensor.battery is not None:
|
||||
new_battery = DeconzBattery(sensor, gateway)
|
||||
|
||||
Reference in new issue
Block a user