fix light state

This commit is contained in:
J. Nick Koston 2023-06-07 17:25:14 -05:00
parent 43453573d8
commit 50228f5679
No known key found for this signature in database
2 changed files with 2 additions and 1 deletions

View File

@ -10,7 +10,7 @@ namespace ratgdo {
void RATGDOBinarySensor::setup()
{
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()

View File

@ -16,6 +16,7 @@ namespace ratgdo {
class RATGDOBinarySensor : public binary_sensor::BinarySensor, public RATGDOClient, public Component {
public:
void setup() override;
void dump_config() override;
void set_binary_sensor_type(SensorType binary_sensor_type_) { this->binary_sensor_type_ = binary_sensor_type_; }