20#ifdef USE_BINARY_SENSOR
21 PUBLISH_STATE(this->attached_binary_sensor_, (
status & PD_STATUS1_ATTACHED) != 0);
22 if (this->cc_direction_binary_sensor_ !=
nullptr) {
24 if (
status & PD_STATUS1_ATTACHED) {
25 this->cc_direction_binary_sensor_->publish_state((
status & PD_STATUS1_CC_DIR) != 0);
27 this->cc_direction_binary_sensor_->invalidate_state();