Skip to content

Commit

Permalink
Change Hue zigbee connectivity sensor into an enum (#98632)
Browse files Browse the repository at this point in the history
  • Loading branch information
joostlek authored Sep 19, 2023
1 parent f01c71e commit 11a9001
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
10 changes: 10 additions & 0 deletions homeassistant/components/hue/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,16 @@
}
}
}
},
"sensor": {
"zigbee_connectivity": {
"state": {
"connected": "[%key:common::state::connected%]",
"disconnected": "[%key:common::state::disconnected%]",
"connectivity_issue": "Connectivity issue",
"unidirectional_incoming": "Unidirectional incoming"
}
}
}
},
"options": {
Expand Down
8 changes: 8 additions & 0 deletions homeassistant/components/hue/v2/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,14 @@ class HueZigbeeConnectivitySensor(HueSensorBase):
"""Representation of a Hue ZigbeeConnectivity sensor."""

_attr_entity_category = EntityCategory.DIAGNOSTIC
_attr_translation_key = "zigbee_connectivity"
_attr_device_class = SensorDeviceClass.ENUM
_attr_options = [
"connected",
"disconnected",
"connectivity_issue",
"unidirectional_incoming",
]
_attr_entity_registry_enabled_default = False

@property
Expand Down

0 comments on commit 11a9001

Please sign in to comment.