9static const char *
const TAG = 
"time_based.cover";
 
   14  LOG_COVER(
"", 
"Time Based Cover", 
this);
 
   16                "  Open Duration: %.1fs\n" 
   17                "  Close Duration: %.1fs",
 
 
   22  if (restore.has_value()) {
 
 
   57  traits.set_supports_stop(
true);
 
   58  traits.set_supports_position(
true);
 
   59  traits.set_supports_toggle(
true);
 
 
   64  if (
call.get_stop()) {
 
   83    auto pos = *
call.get_position();
 
 
  151  const uint32_t now = 
millis();
 
 
  178  const uint32_t now = 
millis();
 
  180  this->
position = clamp(this->position, 0.0f, 1.0f);
 
 
 
uint32_t IRAM_ATTR HOT get_loop_component_start_time() const
Get the cached time in milliseconds from when the current component started its loop execution.
 
void stop_action()
Stop any action connected to this trigger.
 
void trigger(Ts... x)
Inform the parent automation that the event has triggered.
 
const optional< bool > & get_toggle() const
 
const optional< float > & get_position() const
 
CoverOperation current_operation
The current operation of the cover (idle, opening, closing).
 
optional< CoverRestoreState > restore_state_()
 
void publish_state(bool save=true)
Publish the current state of the cover.
 
float position
The position of the cover from 0.0 (fully closed) to 1.0 (fully open).
 
cover::CoverTraits get_traits() override
 
float get_setup_priority() const override
 
void stop_prev_trigger_()
 
bool has_built_in_endstop_
 
uint32_t last_recompute_time_
 
bool is_at_target_() const
 
void recompute_position_()
 
uint32_t last_publish_time_
 
void start_direction_(cover::CoverOperation dir)
 
void control(const cover::CoverCall &call) override
 
Trigger * prev_command_trigger_
 
void dump_config() override
 
cover::CoverOperation last_operation_
 
CoverOperation
Enum encoding the current operation of a cover.
 
@ COVER_OPERATION_OPENING
The cover is currently opening.
 
@ COVER_OPERATION_CLOSING
The cover is currently closing.
 
@ COVER_OPERATION_IDLE
The cover is currently idle (not moving)
 
const float DATA
For components that import data from directly connected sensors like DHT.
 
Providing packet encoding functions for exchanging data with a remote host.
 
uint32_t IRAM_ATTR HOT millis()
 
Application App
Global storage of Application pointer - only one Application can exist.