mirror of
https://github.com/natekspencer/hacs-oasis_mini.git
synced 2025-12-06 18:44:14 -05:00
Use tuples instead of sets for descriptors
This commit is contained in:
@@ -49,7 +49,7 @@ async def async_setup_entry(
|
||||
setup_platform_from_coordinator(entry, async_add_entities, make_entities)
|
||||
|
||||
|
||||
DESCRIPTORS = {
|
||||
DESCRIPTORS = (
|
||||
BinarySensorEntityDescription(
|
||||
key="busy",
|
||||
translation_key="busy",
|
||||
@@ -63,7 +63,7 @@ DESCRIPTORS = {
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
entity_registry_enabled_default=False,
|
||||
),
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
class OasisDeviceBinarySensorEntity(OasisDeviceEntity, BinarySensorEntity):
|
||||
|
||||
@@ -52,7 +52,7 @@ async def async_setup_entry(
|
||||
setup_platform_from_coordinator(entry, async_add_entities, make_entities)
|
||||
|
||||
|
||||
DESCRIPTORS = {
|
||||
DESCRIPTORS = (
|
||||
NumberEntityDescription(
|
||||
key="ball_speed",
|
||||
translation_key="ball_speed",
|
||||
@@ -69,7 +69,7 @@ DESCRIPTORS = {
|
||||
native_max_value=LED_SPEED_MAX,
|
||||
native_min_value=LED_SPEED_MIN,
|
||||
),
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
class OasisDeviceNumberEntity(OasisDeviceEntity, NumberEntity):
|
||||
|
||||
@@ -51,7 +51,7 @@ async def async_setup_entry(
|
||||
setup_platform_from_coordinator(entry, async_add_entities, make_entities)
|
||||
|
||||
|
||||
DESCRIPTORS = {
|
||||
DESCRIPTORS = [
|
||||
SensorEntityDescription(
|
||||
key="download_progress",
|
||||
translation_key="download_progress",
|
||||
@@ -68,7 +68,8 @@ DESCRIPTORS = {
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
suggested_display_precision=1,
|
||||
),
|
||||
} | {
|
||||
]
|
||||
DESCRIPTORS.extend(
|
||||
SensorEntityDescription(
|
||||
key=key,
|
||||
translation_key=key,
|
||||
@@ -77,7 +78,7 @@ DESCRIPTORS = {
|
||||
)
|
||||
for key in ("error", "led_color_id", "status")
|
||||
# for key in ("error_message", "led_color_id", "status")
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
class OasisDeviceSensorEntity(OasisDeviceEntity, SensorEntity):
|
||||
|
||||
@@ -49,13 +49,13 @@ async def async_setup_entry(
|
||||
setup_platform_from_coordinator(entry, async_add_entities, make_entities)
|
||||
|
||||
|
||||
DESCRIPTORS = {
|
||||
DESCRIPTORS = (
|
||||
SwitchEntityDescription(
|
||||
key="auto_clean",
|
||||
translation_key="auto_clean",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
class OasisDeviceSwitchEntity(OasisDeviceEntity, SwitchEntity):
|
||||
|
||||
Reference in New Issue
Block a user