39
39
async_dispatcher_connect ,
40
40
async_dispatcher_send ,
41
41
)
42
- from homeassistant .helpers .entity import DeviceInfo , Entity , EntityCategory
42
+ from homeassistant .helpers .entity import DeviceInfo , Entity
43
43
from homeassistant .helpers .typing import HomeAssistantType
44
44
45
45
from . import MeterInfo
@@ -66,7 +66,7 @@ class EntitySetup(NamedTuple):
66
66
use_configured_scaling : bool
67
67
68
68
"""The category of the entity, if any."""
69
- entity_category : Union [EntityCategory , str , None ]
69
+ entity_category : Union [str , None ]
70
70
71
71
"""The device class of entity, if any."""
72
72
device_class : Optional [str ]
@@ -109,7 +109,7 @@ class NorhanEntity(SensorEntity):
109
109
ENTITY_SETUPS : ClassVar [Dict [str , EntitySetup ]] = {
110
110
obis_map .NEK_HAN_FIELD_METER_ID : EntitySetup (
111
111
False ,
112
- EntityCategory . DIAGNOSTIC ,
112
+ "diagnostic" ,
113
113
None ,
114
114
None ,
115
115
None ,
@@ -120,7 +120,7 @@ class NorhanEntity(SensorEntity):
120
120
),
121
121
obis_map .NEK_HAN_FIELD_METER_MANUFACTURER : EntitySetup (
122
122
False ,
123
- EntityCategory . DIAGNOSTIC ,
123
+ "diagnostic" ,
124
124
None ,
125
125
None ,
126
126
None ,
@@ -131,7 +131,7 @@ class NorhanEntity(SensorEntity):
131
131
),
132
132
obis_map .NEK_HAN_FIELD_METER_TYPE : EntitySetup (
133
133
False ,
134
- EntityCategory . DIAGNOSTIC ,
134
+ "diagnostic" ,
135
135
None ,
136
136
None ,
137
137
None ,
@@ -142,7 +142,7 @@ class NorhanEntity(SensorEntity):
142
142
),
143
143
obis_map .NEK_HAN_FIELD_OBIS_LIST_VER_ID : EntitySetup (
144
144
False ,
145
- EntityCategory . DIAGNOSTIC ,
145
+ "diagnostic" ,
146
146
None ,
147
147
None ,
148
148
None ,
@@ -451,7 +451,7 @@ def icon(self) -> Optional[str]:
451
451
return self ._entity_setup .icon
452
452
453
453
@property
454
- def entity_category (self ) -> Union [EntityCategory , str , None ]:
454
+ def entity_category (self ) -> Union [str , None ]:
455
455
"""Return the category of the entity, if any."""
456
456
return self ._entity_setup .entity_category
457
457
0 commit comments