Home IO Control
ESPHome add-on for IO-Homecontrol devices
Loading...
Searching...
No Matches
oneway_controller.cpp
Go to the documentation of this file.
1/// @file oneway_controller.cpp
2/// @brief Controller identities for the one-way (1W) protocol.
3/// @ingroup hioc_protocol
4
5#include "oneway_controller.h"
6
7namespace esphome {
8namespace home_io_control {
9
10const char *oneway_power_class_name(OneWayPowerClass power_class) {
11 switch (power_class) {
13 return "always-alive";
15 return "low-power";
17 default:
18 return "legacy long";
19 }
20}
21
23 switch (action) {
25 return "OPEN";
27 return "CLOSE";
29 return "VENT";
31 return "FAVORITE";
33 default:
34 return "STOP";
35 }
36}
37
38} // namespace home_io_control
39} // namespace esphome
const char * oneway_button_action_name(OneWayButtonAction action)
Human-readable name for a button action, as it appears in the diagnostic sensor.
OneWayButtonAction
The command a generated 1W button sends.
OneWayPowerClass
Which preamble/CTRL1 shape a 1W identity's bursts actually go out with.
@ LOW_POWER
low_power: true: copy 1 LONG_PREAMBLE + CTRL1_LOW_POWER, repeats normal.
@ ALWAYS_ALIVE
low_power: false: normal start preamble on every copy, CTRL1 0x00.
@ LEGACY_LONG
LONG_PREAMBLE on every copy, CTRL1 0x00 everywhere.
const char * oneway_power_class_name(OneWayPowerClass power_class)
Human-readable name for a OneWayPowerClass, as it appears in the boot log.
Controller identities for the one-way (1W) protocol.