1
0
mirror of https://github.com/esphome/esphome.git synced 2025-03-14 14:48:18 +00:00

renamed add_sensor to add_channel

This commit is contained in:
mvturnho 2019-05-17 13:36:11 +02:00
parent 95491a48d1
commit f31a9ad9ef
3 changed files with 3 additions and 3 deletions

View File

@ -52,7 +52,7 @@ void BinarySensorMap::process_group_() {
}
}
void BinarySensorMap::add_sensor(binary_sensor::BinarySensor *sensor, float value) {
void BinarySensorMap::add_channel(binary_sensor::BinarySensor *sensor, float value) {
BinarySensorMapChannel *sensor_channel = new BinarySensorMapChannel;
sensor_channel->binary_sensor = sensor;
sensor_channel->sensor_value = value;

View File

@ -39,7 +39,7 @@ class BinarySensorMap : public sensor::Sensor, public Component {
* @param *sensor The binary sensor.
* @param value The value this binary_sensor represents
*/
void add_sensor(binary_sensor::BinarySensor *sensor, float value);
void add_channel(binary_sensor::BinarySensor *sensor, float value);
void set_sensor_type(BinarySensorMapType sensor_type);
protected:

View File

@ -35,4 +35,4 @@ def to_code(config):
for ch in config[CONF_CHANNELS]:
input_var = yield cg.get_variable(ch[CONF_CHANNEL])
cg.add(var.add_sensor(input_var,ch[CONF_VALUE]))
cg.add(var.add_channel(input_var, ch[CONF_VALUE]))