31 lines
748 B
C++
31 lines
748 B
C++
#pragma once
|
|
|
|
#include "esphome/core/component.h"
|
|
#include "esphome/components/binary_sensor/binary_sensor.h"
|
|
|
|
namespace esphome {
|
|
namespace app_status {
|
|
|
|
class AppStatus : public binary_sensor::BinarySensor, public PollingComponent {
|
|
public:
|
|
//void loop() override;
|
|
void setup() override;
|
|
void update() override;
|
|
void dump_config() override;
|
|
|
|
//float get_loop_priority() const override { return 50.0f; }
|
|
|
|
void set_include_errors(bool allow) { this->include_errors_ = allow; }
|
|
void set_include_warnings(bool allow) { this->include_warnings_ = allow; }
|
|
|
|
protected:
|
|
//uint8_t last_app_state_(0xFF);
|
|
bool include_warnings_{true};
|
|
bool include_errors_{true};
|
|
};
|
|
|
|
} // namespace app_status
|
|
} // namespace esphome
|
|
|
|
// vim:set sw=2:
|