ESPHome
2024.10.2
esphome
esphome
components
dfrobot_sen0395
switch
dfrobot_sen0395_switch.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
esphome/components/switch/switch.h
"
4
#include "
esphome/core/component.h
"
5
6
#include "../dfrobot_sen0395.h"
7
8
namespace
esphome
{
9
namespace
dfrobot_sen0395 {
10
11
class
DfrobotSen0395Switch
:
public
switch_::Switch
,
public
Component
,
public
Parented
<DfrobotSen0395Component> {};
12
13
class
Sen0395PowerSwitch
:
public
DfrobotSen0395Switch
{
14
public
:
15
void
write_state
(
bool
state
)
override
;
16
};
17
18
class
Sen0395LedSwitch
:
public
DfrobotSen0395Switch
{
19
public
:
20
void
write_state
(
bool
state
)
override
;
21
};
22
23
class
Sen0395UartPresenceSwitch
:
public
DfrobotSen0395Switch
{
24
public
:
25
void
write_state
(
bool
state
)
override
;
26
};
27
28
class
Sen0395StartAfterBootSwitch
:
public
DfrobotSen0395Switch
{
29
public
:
30
void
write_state
(
bool
state
)
override
;
31
};
32
33
}
// namespace dfrobot_sen0395
34
}
// namespace esphome
esphome::switch_::Switch
Base class for all switches.
Definition:
switch.h:39
esphome::Component
Definition:
component.h:68
esphome::switch_::Switch::write_state
virtual void write_state(bool state)=0
Write the given state to hardware.
esphome::dfrobot_sen0395::Sen0395StartAfterBootSwitch
Definition:
dfrobot_sen0395_switch.h:28
esphome::dfrobot_sen0395::Sen0395UartPresenceSwitch
Definition:
dfrobot_sen0395_switch.h:23
esphome::dfrobot_sen0395::DfrobotSen0395Switch
Definition:
dfrobot_sen0395_switch.h:11
switch.h
esphome::dfrobot_sen0395::Sen0395PowerSwitch
Definition:
dfrobot_sen0395_switch.h:13
esphome::dfrobot_sen0395::Sen0395LedSwitch
Definition:
dfrobot_sen0395_switch.h:18
esphome
Implementation of SPI Controller mode.
Definition:
a01nyub.cpp:7
component.h
esphome::switch_::Switch::state
bool state
The current reported state of the binary sensor.
Definition:
switch.h:53
esphome::Parented
Helper class to easily give an object a parent of type T.
Definition:
helpers.h:521
Generated by
1.8.13