Fix call values in Aussie Broadband (#87229)

Fixed calls values

Added lamda for International, Voicemail, and Other calls.
This commit is contained in:
Brett Adams 2023-02-03 12:10:47 +10:00 committed by GitHub
parent 934bb3e0c1
commit 904b25d0d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -78,6 +78,7 @@ SENSOR_DESCRIPTIONS: tuple[SensorValueEntityDescription, ...] = (
entity_registry_enabled_default=False, entity_registry_enabled_default=False,
state_class=SensorStateClass.TOTAL_INCREASING, state_class=SensorStateClass.TOTAL_INCREASING,
icon="mdi:phone-plus", icon="mdi:phone-plus",
value=lambda x: x.get("calls"),
), ),
SensorValueEntityDescription( SensorValueEntityDescription(
key="sms", key="sms",
@ -101,6 +102,7 @@ SENSOR_DESCRIPTIONS: tuple[SensorValueEntityDescription, ...] = (
entity_registry_enabled_default=False, entity_registry_enabled_default=False,
state_class=SensorStateClass.TOTAL_INCREASING, state_class=SensorStateClass.TOTAL_INCREASING,
icon="mdi:phone", icon="mdi:phone",
value=lambda x: x.get("calls"),
), ),
SensorValueEntityDescription( SensorValueEntityDescription(
key="other", key="other",
@ -108,6 +110,7 @@ SENSOR_DESCRIPTIONS: tuple[SensorValueEntityDescription, ...] = (
entity_registry_enabled_default=False, entity_registry_enabled_default=False,
state_class=SensorStateClass.TOTAL_INCREASING, state_class=SensorStateClass.TOTAL_INCREASING,
icon="mdi:phone", icon="mdi:phone",
value=lambda x: x.get("calls"),
), ),
# Generic sensors # Generic sensors
SensorValueEntityDescription( SensorValueEntityDescription(