ESPHome 2026.11.0-dev
Loading...
Searching...
No Matches
samsung.h
Go to the documentation of this file.
1#pragma once
2
5
6#include <array>
7
8namespace esphome::samsung {
9
10static constexpr uint8_t SAMSUNG_AC_TEMP_MIN = 16;
11static constexpr uint8_t SAMSUNG_AC_TEMP_MAX = 30;
12// A frame is made of 7 byte sections; the normal state is two sections and a power change adds a timer section
13static constexpr uint8_t SAMSUNG_AC_SECTION_LENGTH = 7;
14static constexpr uint8_t SAMSUNG_AC_STATE_LENGTH = 2 * SAMSUNG_AC_SECTION_LENGTH;
15
17 public:
19
20 protected:
21 void transmit_state() override;
23
25 void send_sections_(const uint8_t *const *sections, uint8_t count);
26
27 // The last state sent or received; its power bits say whether the next frame has to switch power
28 std::array<uint8_t, SAMSUNG_AC_STATE_LENGTH> state_{};
29};
30
31} // namespace esphome::samsung
bool on_receive(remote_base::RemoteReceiveData data) override
Definition samsung.cpp:177
std::array< uint8_t, SAMSUNG_AC_STATE_LENGTH > state_
Definition samsung.h:28
void send_sections_(const uint8_t *const *sections, uint8_t count)
Send the given sections as one frame, each with its checksum filled in.
Definition samsung.cpp:149
unsigned count
Definition gif.cpp:51