ESPHome
2025.2.2
Main Page
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
y
+
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
b
d
e
f
i
j
l
m
n
p
q
r
s
t
u
v
+
Enumerations
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
z
+
Enumerator
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
c
d
o
p
s
t
v
w
+
Enumerations
b
c
e
f
i
m
n
p
r
s
t
v
+
Enumerator
a
b
c
d
e
f
g
i
l
m
n
o
p
r
s
t
u
v
w
Related Functions
+
Files
File List
+
Globals
+
All
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
y
+
Functions
_
a
l
m
o
s
t
u
+
Variables
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
y
Typedefs
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Modules
Pages
esphome
esphome
components
pipsolar
output
pipsolar_output.cpp
Go to the documentation of this file.
1
#include "
pipsolar_output.h
"
2
#include "
esphome/core/log.h
"
3
#include "
esphome/core/helpers.h
"
4
5
namespace
esphome
{
6
namespace
pipsolar {
7
8
static
const
char
*
const
TAG =
"pipsolar.output"
;
9
10
void
PipsolarOutput::write_state
(
float
state
) {
11
char
tmp[10];
12
sprintf(tmp, this->
set_command_
.c_str(),
state
);
13
14
if
(std::find(this->
possible_values_
.begin(), this->
possible_values_
.end(),
state
) != this->
possible_values_
.end()) {
15
ESP_LOGD(TAG,
"Will write: %s out of value %f / %02.0f"
, tmp, state, state);
16
this->
parent_
->switch_command(std::string(tmp));
17
}
else
{
18
ESP_LOGD(TAG,
"Will not write: %s as it is not in list of allowed values"
, tmp);
19
}
20
}
21
}
// namespace pipsolar
22
}
// namespace esphome
esphome::pipsolar::PipsolarOutput::parent_
Pipsolar * parent_
Definition:
pipsolar_output.h:25
esphome::pipsolar::PipsolarOutput::possible_values_
std::vector< float > possible_values_
Definition:
pipsolar_output.h:26
esphome::pipsolar::PipsolarOutput::write_state
void write_state(float state) override
Definition:
pipsolar_output.cpp:10
pipsolar_output.h
esphome::pipsolar::PipsolarOutput::set_command_
std::string set_command_
Definition:
pipsolar_output.h:24
esphome
Implementation of SPI Controller mode.
Definition:
a01nyub.cpp:7
helpers.h
log.h
state
bool state
Definition:
fan.h:34
Generated by
1.8.13