Update bthome.cpp

This commit is contained in:
t0urista 2024-10-28 15:11:51 +01:00 committed by GitHub
parent e130c58c89
commit 81ca51db57
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -513,6 +513,10 @@ void BTHome::set_window(binary_sensor::BinarySensor *window) {
this->window_ = window;
this->set_publisher(oid_window.new_publisher(window));
}
void BTHome::set_motion(binary_sensor::BinarySensor *motion) {
this->motion_ = motion;
this->set_publisher(oid_motion.new_publisher(motion));
}
#endif
#ifdef USE_SENSOR
@ -528,6 +532,14 @@ void BTHome::set_battery_level(sensor::Sensor *battery_level) {
this->battery_level_ = battery_level;
this->set_publisher(oid_battery_percent.new_publisher(battery_level));
}
void BTHome::set_humidity(sensor::Sensor *humidity) {
this->humidity_ = humidity;
this->set_publisher(oid_humidity.new_publisher(humidity));
}
void BTHome::set_temperature(sensor::Sensor *temperature) {
this->temperature_ = temperature;
this->set_publisher(oid_temperature.new_publisher(temperature));
}
#endif
} // namespace bthome