Fix remote_receiver binary_sensor (#592)

Fixes https://github.com/esphome/issues/issues/369
This commit is contained in:
Otto Winter 2019-06-01 13:22:28 +02:00
parent 075fcb77a8
commit f3fc9e4142
No known key found for this signature in database
GPG key ID: DB66C0BE6013F97E

View file

@ -293,7 +293,7 @@ template<typename T, typename D> class RemoteReceiverBinarySensor : public Remot
bool matches(RemoteReceiveData src) override { bool matches(RemoteReceiveData src) override {
auto proto = T(); auto proto = T();
auto res = proto.decode(src); auto res = proto.decode(src);
return res.has_value(); return res.has_value() && *res == this->data_;
} }
public: public: