ESPHome
2026.11.0-dev
Loading...
Searching...
No Matches
esphome
components
airton
select
direction.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
esphome/components/select/select.h
"
4
#include "
../airton.h
"
5
6
namespace
esphome::airton
{
7
8
class
VerticalDirectionSelect
:
public
select::Select
,
public
Parented
<AirtonClimate> {
9
protected
:
10
// The options are in the order of the enum, so the index is the direction; the parent publishes the state
11
void
control
(
size_t
index)
override
{
12
if
(this->
parent_
->set_vertical_direction_state(
static_cast<
VerticalDirection
>
(index)))
13
this->
parent_
->send_settings();
14
}
15
};
16
17
}
// namespace esphome::airton
airton.h
esphome::Parented
Helper class to easily give an object a parent of type T.
Definition
helpers.h:2073
esphome::Parented< AirtonClimate >::parent_
AirtonClimate * parent_
Definition
helpers.h:2084
esphome::airton::VerticalDirectionSelect
Definition
direction.h:8
esphome::airton::VerticalDirectionSelect::control
void control(size_t index) override
Definition
direction.h:11
esphome::select::Select
Base-class for all selects.
Definition
select.h:28
esphome::airton
Definition
airton.cpp:5
esphome::airton::VerticalDirection
VerticalDirection
Definition
airton.h:50
select.h
Generated by
1.12.0