Home IO Control
ESPHome add-on for IO-Homecontrol devices
Toggle main menu visibility
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
7
namespace
esphome
{
8
namespace
home_io_control
{
9
10
const
char
*
oneway_power_class_name
(
OneWayPowerClass
power_class) {
11
switch
(power_class) {
12
case
OneWayPowerClass::ALWAYS_ALIVE
:
13
return
"always-alive"
;
14
case
OneWayPowerClass::LOW_POWER
:
15
return
"low-power"
;
16
case
OneWayPowerClass::LEGACY_LONG
:
17
default
:
18
return
"legacy long"
;
19
}
20
}
21
22
const
char
*
oneway_button_action_name
(
OneWayButtonAction
action) {
23
switch
(action) {
24
case
OneWayButtonAction::OPEN
:
25
return
"OPEN"
;
26
case
OneWayButtonAction::CLOSE
:
27
return
"CLOSE"
;
28
case
OneWayButtonAction::VENT
:
29
return
"VENT"
;
30
case
OneWayButtonAction::FAVORITE
:
31
return
"FAVORITE"
;
32
case
OneWayButtonAction::STOP
:
33
default
:
34
return
"STOP"
;
35
}
36
}
37
38
}
// namespace home_io_control
39
}
// namespace esphome
esphome::home_io_control::oneway_button_action_name
const char * oneway_button_action_name(OneWayButtonAction action)
Human-readable name for a button action, as it appears in the diagnostic sensor.
Definition
oneway_controller.cpp:22
esphome::home_io_control::OneWayButtonAction
OneWayButtonAction
The command a generated 1W button sends.
Definition
oneway_controller.h:266
esphome::home_io_control::OneWayButtonAction::FAVORITE
@ FAVORITE
CoverCommand::FAVORITE.
Definition
oneway_controller.h:271
esphome::home_io_control::OneWayButtonAction::STOP
@ STOP
CoverCommand::STOP.
Definition
oneway_controller.h:269
esphome::home_io_control::OneWayButtonAction::VENT
@ VENT
CoverCommand::VENT.
Definition
oneway_controller.h:270
esphome::home_io_control::OneWayButtonAction::CLOSE
@ CLOSE
Position 100 (fully closed).
Definition
oneway_controller.h:268
esphome::home_io_control::OneWayButtonAction::OPEN
@ OPEN
Position 0 (fully open).
Definition
oneway_controller.h:267
esphome::home_io_control
Definition
device_registry.cpp:13
esphome::home_io_control::OneWayPowerClass
OneWayPowerClass
Which preamble/CTRL1 shape a 1W identity's bursts actually go out with.
Definition
oneway_controller.h:45
esphome::home_io_control::OneWayPowerClass::LOW_POWER
@ LOW_POWER
low_power: true: copy 1 LONG_PREAMBLE + CTRL1_LOW_POWER, repeats normal.
Definition
oneway_controller.h:48
esphome::home_io_control::OneWayPowerClass::ALWAYS_ALIVE
@ ALWAYS_ALIVE
low_power: false: normal start preamble on every copy, CTRL1 0x00.
Definition
oneway_controller.h:47
esphome::home_io_control::OneWayPowerClass::LEGACY_LONG
@ LEGACY_LONG
LONG_PREAMBLE on every copy, CTRL1 0x00 everywhere.
Definition
oneway_controller.h:46
esphome::home_io_control::oneway_power_class_name
const char * oneway_power_class_name(OneWayPowerClass power_class)
Human-readable name for a OneWayPowerClass, as it appears in the boot log.
Definition
oneway_controller.cpp:10
esphome
Definition
device_registry.cpp:12
oneway_controller.h
Controller identities for the one-way (1W) protocol.
components
home_io_control
oneway_controller.cpp
Generated by
1.18.0