From f31a9ad9efd780d3ab68ffda89504ab50e768c83 Mon Sep 17 00:00:00 2001 From: mvturnho Date: Fri, 17 May 2019 13:36:11 +0200 Subject: [PATCH] renamed add_sensor to add_channel --- esphome/components/binary_sensor_map/binary_sensor_map.cpp | 2 +- esphome/components/binary_sensor_map/binary_sensor_map.h | 2 +- esphome/components/binary_sensor_map/sensor.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/esphome/components/binary_sensor_map/binary_sensor_map.cpp b/esphome/components/binary_sensor_map/binary_sensor_map.cpp index 038cc2e5bb..ab02ae7a07 100644 --- a/esphome/components/binary_sensor_map/binary_sensor_map.cpp +++ b/esphome/components/binary_sensor_map/binary_sensor_map.cpp @@ -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; diff --git a/esphome/components/binary_sensor_map/binary_sensor_map.h b/esphome/components/binary_sensor_map/binary_sensor_map.h index 5ac5c879a4..4ca25d3b31 100644 --- a/esphome/components/binary_sensor_map/binary_sensor_map.h +++ b/esphome/components/binary_sensor_map/binary_sensor_map.h @@ -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: diff --git a/esphome/components/binary_sensor_map/sensor.py b/esphome/components/binary_sensor_map/sensor.py index 2709e0df1c..9377ae6879 100644 --- a/esphome/components/binary_sensor_map/sensor.py +++ b/esphome/components/binary_sensor_map/sensor.py @@ -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])) \ No newline at end of file + cg.add(var.add_channel(input_var, ch[CONF_VALUE]))