Improve Sensibo terminology (#72451)
parent
301341a49f
commit
a2a691f232
|
@ -29,7 +29,7 @@ class SensiboNumberEntityDescription(
|
|||
"""Class describing Sensibo Number entities."""
|
||||
|
||||
|
||||
NUMBER_TYPES = (
|
||||
DEVICE_NUMBER_TYPES = (
|
||||
SensiboNumberEntityDescription(
|
||||
key="calibration_temp",
|
||||
remote_key="temperature",
|
||||
|
@ -65,7 +65,7 @@ async def async_setup_entry(
|
|||
async_add_entities(
|
||||
SensiboNumber(coordinator, device_id, description)
|
||||
for device_id, device_data in coordinator.data.parsed.items()
|
||||
for description in NUMBER_TYPES
|
||||
for description in DEVICE_NUMBER_TYPES
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ class SensiboSelectEntityDescription(
|
|||
"""Class describing Sensibo Number entities."""
|
||||
|
||||
|
||||
SELECT_TYPES = (
|
||||
DEVICE_SELECT_TYPES = (
|
||||
SensiboSelectEntityDescription(
|
||||
key="horizontalSwing",
|
||||
remote_key="horizontal_swing_mode",
|
||||
|
@ -57,7 +57,7 @@ async def async_setup_entry(
|
|||
async_add_entities(
|
||||
SensiboSelect(coordinator, device_id, description)
|
||||
for device_id, device_data in coordinator.data.parsed.items()
|
||||
for description in SELECT_TYPES
|
||||
for description in DEVICE_SELECT_TYPES
|
||||
if description.key in device_data.full_features
|
||||
)
|
||||
|
||||
|
|
|
@ -99,7 +99,7 @@ MOTION_SENSOR_TYPES: tuple[SensiboMotionSensorEntityDescription, ...] = (
|
|||
value_fn=lambda data: data.temperature,
|
||||
),
|
||||
)
|
||||
DEVICE_SENSOR_TYPES: tuple[SensiboDeviceSensorEntityDescription, ...] = (
|
||||
PURE_SENSOR_TYPES: tuple[SensiboDeviceSensorEntityDescription, ...] = (
|
||||
SensiboDeviceSensorEntityDescription(
|
||||
key="pm25",
|
||||
device_class=SensorDeviceClass.PM25,
|
||||
|
@ -137,8 +137,8 @@ async def async_setup_entry(
|
|||
entities.extend(
|
||||
SensiboDeviceSensor(coordinator, device_id, description)
|
||||
for device_id, device_data in coordinator.data.parsed.items()
|
||||
for description in DEVICE_SENSOR_TYPES
|
||||
if getattr(device_data, description.key) is not None
|
||||
for description in PURE_SENSOR_TYPES
|
||||
if device_data.model == "pure"
|
||||
)
|
||||
async_add_entities(entities)
|
||||
|
||||
|
|
Loading…
Reference in New Issue