9void MT6701SPIBinarySensors::loop() {
14 if (!this->
parent_->read_encoder())
17 if (this->push_button_binary_sensor_ !=
nullptr)
18 this->push_button_binary_sensor_->publish_state((status & 0x04) != 0);
19 if (this->track_loss_binary_sensor_ !=
nullptr)
20 this->track_loss_binary_sensor_->publish_state((status & 0x08) != 0);
23void MT6701SPIBinarySensors::dump_config() {
24 ESP_LOGCONFIG(TAG,
"MT6701 status:\n Update Interval: %" PRIu32
" ms", this->update_interval_);
25 LOG_BINARY_SENSOR(
" ",
"Push button", this->push_button_binary_sensor_);
26 LOG_BINARY_SENSOR(
" ",
"Track loss", this->track_loss_binary_sensor_);