1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-03 20:02:22 +01:00

Adding last_reset_type to sensors that should support it. (#2039)

This commit is contained in:
Jesse Hills
2021-07-21 09:20:20 +12:00
committed by GitHub
parent fc0deb642a
commit 3b3297d269
14 changed files with 153 additions and 15 deletions

View File

@@ -399,6 +399,7 @@ bool APIConnection::send_sensor_info(sensor::Sensor *sensor) {
msg.force_update = sensor->get_force_update();
msg.device_class = sensor->get_device_class();
msg.state_class = static_cast<enums::SensorStateClass>(sensor->state_class);
msg.last_reset_type = static_cast<enums::SensorLastResetType>(sensor->last_reset_type);
return this->send_list_entities_sensor_response(msg);
}