File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
custom_components/connectlife Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 1515from .dictionaries import Dictionaries , Dictionary , Property
1616from .entity import ConnectLifeEntity
1717from connectlife .api import LifeConnectError
18- from connectlife .appliance import ConnectLifeAppliance
18+ from connectlife .appliance import ConnectLifeAppliance , MAX_DATETIME
1919from .utils import is_entity , to_unit
2020
2121SERVICE_SET_VALUE = "set_value"
@@ -73,6 +73,8 @@ def __init__(
7373 elif (device_class is None
7474 and isinstance (self .coordinator .data [self .device_id ].status_list [status ], datetime .datetime )):
7575 device_class = SensorDeviceClass .TIMESTAMP
76+ if device_class == SensorDeviceClass .TIMESTAMP and self .unknown_value is None :
77+ self .unknown_value = MAX_DATETIME
7678 state_class = dd_entry .sensor .state_class
7779 if (state_class is None
7880 and isinstance (self .coordinator .data [self .device_id ].status_list [status ], int )
You can’t perform that action at this time.
0 commit comments