1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-04 20:32:21 +01:00

Clean-up sensor integration (#2275)

This commit is contained in:
Oxan van Leeuwen
2021-09-13 18:58:49 +02:00
committed by GitHub
parent 924df1e7de
commit e6b0a0ca2b
7 changed files with 102 additions and 210 deletions

View File

@@ -422,7 +422,7 @@ bool APIConnection::send_sensor_info(sensor::Sensor *sensor) {
msg.accuracy_decimals = sensor->get_accuracy_decimals();
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.state_class = static_cast<enums::SensorStateClass>(sensor->get_state_class());
msg.disabled_by_default = sensor->is_disabled_by_default();
return this->send_list_entities_sensor_response(msg);