Skip to content

Commit

Permalink
Show errors at error count attribute (#201)
Browse files Browse the repository at this point in the history
  • Loading branch information
fustom authored Sep 13, 2023
1 parent 2a48353 commit 71339d3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions custom_components/ariston/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
ATTR_ECONOMY_TEMP: final = "economy_temp"
ATTR_HOLIDAY: final = "holiday"
ATTR_ZONE: final = "zone_number"
ATTR_ERRORS: final = "errors"

EXTRA_STATE_ATTRIBUTE: final = "Attribute"
EXTRA_STATE_DEVICE_METHOD: final = "DeviceMethod"
Expand Down Expand Up @@ -449,6 +450,12 @@ class AristonSelectEntityDescription(
entity_category=EntityCategory.DIAGNOSTIC,
get_native_value=lambda entity: len(entity.device.bus_errors),
native_unit_of_measurement="",
extra_states=[
{
EXTRA_STATE_ATTRIBUTE: ATTR_ERRORS,
EXTRA_STATE_DEVICE_METHOD: lambda entity: entity.device.bus_errors,
},
]
),
)

Expand Down

0 comments on commit 71339d3

Please sign in to comment.