Fix correct handling in ManualTriggerEntity (#130135)

This commit is contained in:
G Johansson
2024-11-21 20:46:03 +01:00
committed by GitHub
parent 1ab2bbe3b0
commit 797eb606fe
5 changed files with 29 additions and 19 deletions

View File

@@ -187,13 +187,11 @@ class CommandSensor(ManualTriggerSensorEntity):
SensorDeviceClass.TIMESTAMP,
}:
self._attr_native_value = value
self._process_manual_data(value)
return
if value is not None:
elif value is not None:
self._attr_native_value = async_parse_date_datetime(
value, self.entity_id, self.device_class
)
self._process_manual_data(value)
self.async_write_ha_state()