ESPHome 2026.11.0-dev
Loading...
Searching...
No Matches
nexus_protocol.h
Go to the documentation of this file.
1#pragma once
2
3#include "remote_base.h"
4
5namespace esphome::remote_base {
6
7struct NexusData {
8 float temperature; // °C, sent as 12 bit signed tenths
9 uint8_t address;
12 uint8_t channel; // sent 0-based, shown 1-based
13 uint8_t humidity;
14
15 bool operator==(const NexusData &rhs) const {
16 // The binary sensor matches the transmitter, not the reading.
17 return channel == rhs.channel && address == rhs.address;
18 }
19};
20
21class NexusProtocol : public RemoteProtocol<NexusData> {
22 public:
23 void encode(RemoteTransmitData *dst, const NexusData &data);
24 optional<NexusData> decode(RemoteReceiveData src);
25 void dump(const NexusData &data);
26};
27
28DECLARE_REMOTE_PROTOCOL(Nexus)
29
30} // namespace esphome::remote_base
void dump(const NexusData &data)
void encode(RemoteTransmitData *dst, const NexusData &data)
optional< NexusData > decode(RemoteReceiveData src)
const void * src
Definition hal.h:68
bool operator==(const NexusData &rhs) const