ESPHome 2025.6.2
|
#include <demo_valve.h>
Public Member Functions | |
valve::ValveTraits | get_traits () override |
void | set_type (DemoValveType type) |
![]() | |
Valve () | |
ValveCall | make_call () |
Construct a new valve call used to control the valve. | |
void | add_on_state_callback (std::function< void()> &&f) |
void | publish_state (bool save=true) |
Publish the current state of the valve. | |
bool | is_fully_open () const |
Helper method to check if the valve is fully open. Equivalent to comparing .position against 1.0. | |
bool | is_fully_closed () const |
Helper method to check if the valve is fully closed. Equivalent to comparing .position against 0.0. | |
![]() | |
const StringRef & | get_name () const |
void | set_name (const char *name) |
bool | has_own_name () const |
std::string | get_object_id () const |
void | set_object_id (const char *object_id) |
uint32_t | get_object_id_hash () |
bool | is_internal () const |
void | set_internal (bool internal) |
bool | is_disabled_by_default () const |
void | set_disabled_by_default (bool disabled_by_default) |
EntityCategory | get_entity_category () const |
void | set_entity_category (EntityCategory entity_category) |
std::string | get_icon () const |
void | set_icon (const char *icon) |
bool | has_state () const |
void | set_has_state (bool state) |
![]() | |
std::string | get_device_class () |
Get the device class, using the manual override if set. | |
void | set_device_class (const char *device_class) |
Manually set the device class. | |
Protected Member Functions | |
void | control (const valve::ValveCall &call) override |
![]() | |
optional< ValveRestoreState > | restore_state_ () |
![]() | |
virtual uint32_t | hash_base () |
The hash_base() function has been deprecated. | |
void | calc_object_id_ () |
Protected Attributes | |
DemoValveType | type_ {} |
![]() | |
friend | ValveCall |
CallbackManager< void()> | state_callback_ {} |
ESPPreferenceObject | rtc_ |
![]() | |
StringRef | name_ |
const char * | object_id_c_str_ {nullptr} |
const char * | icon_c_str_ {nullptr} |
uint32_t | object_id_hash_ {} |
struct esphome::EntityBase::EntityFlags | flags_ |
![]() | |
const char * | device_class_ {nullptr} |
Device class override. | |
Additional Inherited Members | |
![]() | |
ValveOperation | current_operation {VALVE_OPERATION_IDLE} |
The current operation of the valve (idle, opening, closing). | |
float | position |
The position of the valve from 0.0 (fully closed) to 1.0 (fully open). | |
Definition at line 13 of file demo_valve.h.
|
inlineoverrideprotectedvirtual |
Implements esphome::valve::Valve.
Definition at line 28 of file demo_valve.h.
|
inlineoverridevirtual |
Implements esphome::valve::Valve.
Definition at line 15 of file demo_valve.h.
|
inline |
Definition at line 25 of file demo_valve.h.
|
protected |
Definition at line 50 of file demo_valve.h.