diff --git a/esphome/components/ct002/ct002.cpp b/esphome/components/ct002/ct002.cpp index 58d4213b..fbb688ff 100644 --- a/esphome/components/ct002/ct002.cpp +++ b/esphome/components/ct002/ct002.cpp @@ -569,6 +569,7 @@ bool CT002Component::validate_ct_mac_(const std::vector &fields) co if (this->ct_mac_.empty()) return true; if (fields.size() < 4) return false; std::string req(fields[3]); + if (req.empty() || req == "000000000000") return true; for (auto &c : req) c = static_cast(std::tolower(c)); std::string cfg(this->ct_mac_); for (auto &c : cfg) c = static_cast(std::tolower(c)); diff --git a/src/astrameter/ct002/ct002.py b/src/astrameter/ct002/ct002.py index edd8783a..08984702 100644 --- a/src/astrameter/ct002/ct002.py +++ b/src/astrameter/ct002/ct002.py @@ -1316,6 +1316,8 @@ def _ct_mac_matches(self, request: CT002Request) -> bool: """Whether *request* names the CT MAC we are configured to answer for.""" if not self.ct_mac: return True + if request.ct_mac in ("", "000000000000"): + return True return bool(request.ct_mac) and request.ct_mac.lower() == self.ct_mac.lower() async def _safe_handle_request(