Ignore Lamp time when power off
This commit is contained in:
@@ -3,11 +3,11 @@
|
||||
#include "esphome/core/component.h"
|
||||
#include "esphome/components/uart/uart.h"
|
||||
|
||||
#undef USE_SENSOR
|
||||
#undef USE_BINARY_SENSOR
|
||||
#undef USE_TEXT_SENSOR
|
||||
#undef USE_SELECT
|
||||
#undef USE_SWITCH
|
||||
// #undef USE_SENSOR
|
||||
// #undef USE_BINARY_SENSOR
|
||||
// #undef USE_TEXT_SENSOR
|
||||
// #undef USE_SELECT
|
||||
// #undef USE_SWITCH
|
||||
|
||||
#ifdef USE_SENSOR
|
||||
#include "esphome/components/sensor/sensor.h"
|
||||
@@ -52,19 +52,19 @@ class OptomaRS232Component : public uart::UARTDevice, public PollingComponent {
|
||||
|
||||
// clang-format off
|
||||
#ifndef USE_SENSOR
|
||||
#define SUB_SENSOR(name) protected: DummySensor *name## _sensor_{nullptr}; public:
|
||||
#define SUB_SENSOR(name) protected: DummySensor *name##_sensor_{nullptr}; public:
|
||||
#endif
|
||||
#ifndef USE_BINARY_SENSOR
|
||||
#define SUB_BINARY_SENSOR(name) protected: DummySensor *name## _binary_sensor_{nullptr}; public:
|
||||
#define SUB_BINARY_SENSOR(name) protected: DummySensor *name##_binary_sensor_{nullptr}; public:
|
||||
#endif
|
||||
#ifndef USE_TEXT_SENSOR
|
||||
#define SUB_TEXT_SENSOR(name) protected: DummySensor *name## _text_sensor_{nullptr}; public:
|
||||
#define SUB_TEXT_SENSOR(name) protected: DummySensor *name##_text_sensor_{nullptr}; public:
|
||||
#endif
|
||||
#ifndef USE_SELECT
|
||||
#define SUB_SELECT(name) protected: DummySelect *name## _select_{nullptr}; public:
|
||||
#define SUB_SELECT(name) protected: DummySelect *name##_select_{nullptr}; public:
|
||||
#endif
|
||||
#ifndef USE_SWITCH
|
||||
#define SUB_SWITCH(name) protected: DummySwitch *name## _switch_{nullptr}; public:
|
||||
#define SUB_SWITCH(name) protected: DummySwitch *name##_switch_{nullptr}; public:
|
||||
#endif
|
||||
// clang-format on
|
||||
|
||||
|
||||
Reference in New Issue
Block a user