ESPHome 2025.5.0
Loading...
Searching...
No Matches
m5stack_8angle_binary_sensor.cpp
Go to the documentation of this file.
2
3namespace esphome {
4namespace m5stack_8angle {
5
7 int8_t out = this->parent_->read_switch();
8 if (out == -1) {
9 this->status_set_warning("Could not read binary sensor state from M5Stack 8Angle.");
10 return;
11 }
12 this->publish_state(out != 0);
14}
15
16} // namespace m5stack_8angle
17} // namespace esphome
void status_set_warning(const char *message="unspecified")
void status_clear_warning()
void publish_state(bool state)
Publish a new state to the front-end.
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7