Skip to content

Commit

Permalink
🔧 fix device_class for submersion sensor (#145)
Browse files Browse the repository at this point in the history
  • Loading branch information
al-one committed Jul 25, 2021
1 parent 15fc930 commit 4f5cc31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/xiaomi_miot/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
BinarySensorEntity,
DEVICE_CLASS_MOTION,
DEVICE_CLASS_DOOR,
DEVICE_CLASS_SAFETY,
DEVICE_CLASS_MOISTURE,
)

from . import (
Expand Down Expand Up @@ -101,7 +101,7 @@ def __init__(self, config, miot_service: MiotService, **kwargs):

if miot_service.name in ['submersion_sensor']:
self._prop_state = miot_service.get_property('submersion_state') or self._prop_state
self._vars['device_class'] = DEVICE_CLASS_SAFETY
self._vars['device_class'] = DEVICE_CLASS_MOISTURE

self._state_attrs.update({
'entity_class': self.__class__.__name__,
Expand Down

0 comments on commit 4f5cc31

Please sign in to comment.