|
21 | 21 |
|
22 | 22 | from .const import (
|
23 | 23 | ATTR_UPDATE_STATE,
|
24 |
| - DEVICE_CLASS_CALL_STATE, |
25 |
| - DEVICE_CLASS_SIP_STATE, |
26 | 24 | SENSOR_CALL_STATE,
|
27 | 25 | SENSOR_CALL_STATE_NAME,
|
28 | 26 | SENSOR_SIP_STATE,
|
|
31 | 29 | SIGNAL_SIP_STATE,
|
32 | 30 | )
|
33 | 31 | from .entity import IntercomEntity
|
34 |
| -from .enum import CallState, VoipState |
| 32 | +from .enum import CallState, VoipState, DeviceClass |
35 | 33 | from .updater import IntercomUpdater, async_get_updater
|
36 | 34 |
|
37 | 35 | PARALLEL_UPDATES = 0
|
|
54 | 52 | key=SENSOR_SIP_STATE,
|
55 | 53 | name=SENSOR_SIP_STATE_NAME,
|
56 | 54 | icon="mdi:phone-voip",
|
57 |
| - device_class=DEVICE_CLASS_SIP_STATE, |
| 55 | + device_class=DeviceClass.SIP_STATE, |
58 | 56 | entity_category=EntityCategory.DIAGNOSTIC,
|
59 | 57 | entity_registry_enabled_default=True,
|
60 | 58 | ),
|
|
63 | 61 | name=SENSOR_CALL_STATE_NAME,
|
64 | 62 | icon=ICONS[SENSOR_CALL_STATE][CallState.ENDED.value],
|
65 | 63 | entity_category=EntityCategory.DIAGNOSTIC,
|
66 |
| - device_class=DEVICE_CLASS_CALL_STATE, |
| 64 | + device_class=DeviceClass.CALL_STATE, |
67 | 65 | entity_registry_enabled_default=True,
|
68 | 66 | ),
|
69 | 67 | )
|
@@ -94,6 +92,7 @@ async def async_setup_entry(
|
94 | 92 | async_add_entities(entities)
|
95 | 93 |
|
96 | 94 |
|
| 95 | +# pylint: disable=too-many-ancestors |
97 | 96 | class IntercomSensor(IntercomEntity, SensorEntity):
|
98 | 97 | """Intercom sensor entry."""
|
99 | 98 |
|
|
0 commit comments