7 static const char *
const TAG =
"copy.cover";
31 traits.set_supports_stop(base.get_supports_stop());
32 traits.set_supports_position(base.get_supports_position());
33 traits.set_supports_tilt(base.get_supports_tilt());
34 traits.set_supports_toggle(base.get_supports_toggle());
void publish_state(bool save=true)
Publish the current state of the cover.
CoverCall make_call()
Construct a new cover call used to control the cover.
CoverOperation current_operation
The current operation of the cover (idle, opening, closing).
CoverCall & set_position(float position)
Set the call to a certain target position.
void perform()
Perform the cover call.
CoverCall & set_stop(bool stop)
Set whether this cover call should stop the cover.
float tilt
The current tilt value of the cover from 0.0 to 1.0.
virtual CoverTraits get_traits()=0
void add_on_state_callback(std::function< void()> &&f)
void set_is_assumed_state(bool is_assumed_state)
void control(const cover::CoverCall &call) override
cover::CoverTraits get_traits() override
void dump_config() override
float position
The position of the cover from 0.0 (fully closed) to 1.0 (fully open).
Implementation of SPI Controller mode.
CoverCall & set_tilt(float tilt)
Set the call to a certain target tilt.
const optional< float > & get_tilt() const
const optional< float > & get_position() const