Fix remote_receiver always shows sony (#617)

Fixes https://github.com/esphome/issues/issues/383#issuecomment-498370572
This commit is contained in:
Otto Winter 2019-06-06 13:15:37 +02:00
parent 11605a36f7
commit 8f3635b167
No known key found for this signature in database
GPG key ID: DB66C0BE6013F97E

View file

@ -31,7 +31,7 @@ optional<SonyData> SonyProtocol::decode(RemoteReceiveData src) {
.nbits = 0,
};
if (!src.expect_item(HEADER_HIGH_US, HEADER_LOW_US))
return out;
return {};
for (; out.nbits < 20; out.nbits++) {
uint32_t bit;