mirror of
https://github.com/esphome/esphome.git
synced 2024-11-27 17:27:59 +01:00
Update bthome.cpp
This commit is contained in:
parent
e130c58c89
commit
81ca51db57
1 changed files with 12 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue