ESPHome
2026.11.0-dev
Loading...
Searching...
No Matches
esphome
components
remote_base
nexus_protocol.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
remote_base.h
"
4
5
namespace
esphome::remote_base
{
6
7
struct
NexusData
{
8
float
temperature
;
// °C, sent as 12 bit signed tenths
9
uint8_t
address
;
10
bool
battery_level
;
11
bool
force_update
;
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
21
class
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
28
DECLARE_REMOTE_PROTOCOL(Nexus)
29
30
}
// namespace esphome::remote_base
esphome::remote_base::NexusProtocol
Definition
nexus_protocol.h:21
esphome::remote_base::NexusProtocol::dump
void dump(const NexusData &data)
Definition
nexus_protocol.cpp:76
esphome::remote_base::NexusProtocol::encode
void encode(RemoteTransmitData *dst, const NexusData &data)
Definition
nexus_protocol.cpp:31
esphome::remote_base::NexusProtocol::decode
optional< NexusData > decode(RemoteReceiveData src)
Definition
nexus_protocol.cpp:46
esphome::remote_base::RemoteProtocol
Definition
remote_base.h:319
esphome::remote_base::RemoteReceiveData
Definition
remote_base.h:55
esphome::remote_base::RemoteTransmitData
Definition
remote_base.h:22
esphome::remote_base
Definition
ir_rf_base.cpp:221
esphome::src
const void * src
Definition
hal.h:68
remote_base.h
esphome::remote_base::NexusData
Definition
nexus_protocol.h:7
esphome::remote_base::NexusData::temperature
float temperature
Definition
nexus_protocol.h:8
esphome::remote_base::NexusData::address
uint8_t address
Definition
nexus_protocol.h:9
esphome::remote_base::NexusData::operator==
bool operator==(const NexusData &rhs) const
Definition
nexus_protocol.h:15
esphome::remote_base::NexusData::channel
uint8_t channel
Definition
nexus_protocol.h:12
esphome::remote_base::NexusData::force_update
bool force_update
Definition
nexus_protocol.h:11
esphome::remote_base::NexusData::battery_level
bool battery_level
Definition
nexus_protocol.h:10
esphome::remote_base::NexusData::humidity
uint8_t humidity
Definition
nexus_protocol.h:13
Generated by
1.12.0