fix light state
This commit is contained in:
parent
43453573d8
commit
50228f5679
|
@ -10,7 +10,7 @@ namespace ratgdo {
|
||||||
void RATGDOBinarySensor::setup()
|
void RATGDOBinarySensor::setup()
|
||||||
{
|
{
|
||||||
if (this->binary_sensor_type_ == SensorType::RATGDO_SENSOR_MOTION)
|
if (this->binary_sensor_type_ == SensorType::RATGDO_SENSOR_MOTION)
|
||||||
this->publish_state(state == MotionState::MOTION_STATE_CLEAR);
|
this->publish_state(state == MotionState::MOTION_STATE_CLEAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RATGDOBinarySensor::dump_config()
|
void RATGDOBinarySensor::dump_config()
|
||||||
|
|
|
@ -16,6 +16,7 @@ namespace ratgdo {
|
||||||
|
|
||||||
class RATGDOBinarySensor : public binary_sensor::BinarySensor, public RATGDOClient, public Component {
|
class RATGDOBinarySensor : public binary_sensor::BinarySensor, public RATGDOClient, public Component {
|
||||||
public:
|
public:
|
||||||
|
void setup() override;
|
||||||
void dump_config() override;
|
void dump_config() override;
|
||||||
void set_binary_sensor_type(SensorType binary_sensor_type_) { this->binary_sensor_type_ = binary_sensor_type_; }
|
void set_binary_sensor_type(SensorType binary_sensor_type_) { this->binary_sensor_type_ = binary_sensor_type_; }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue