ESPHome 2025.8.0b2
Loading...
Searching...
No Matches
tormatic_cover.h
Go to the documentation of this file.
1#pragma once
2
5
6#include "tormatic_protocol.h"
7
8namespace esphome {
9namespace tormatic {
10
11using namespace esphome::cover;
12
14 public:
15 void setup() override;
16 void loop() override;
17 void update() override;
18 void dump_config() override;
19
22
23 void publish_state(bool save = true, uint32_t ratelimit = 0);
24
26
27 protected:
28 void control(const cover::CoverCall &call) override;
29
32 void control_position_(float target);
33 void stop_at_target_();
34
35 template<typename T> void send_message_(MessageType t, T r);
36 template<typename T> optional<T> read_data_();
37 void drain_rx_(uint16_t n = 0);
38
41
44
45 uint32_t seq_tx_{0};
46
48
49 uint32_t open_duration_{0};
50 uint32_t close_duration_{0};
51 uint32_t last_publish_time_{0};
56};
57
58} // namespace tormatic
59} // namespace esphome
This class simplifies creating components that periodically check a state.
Definition component.h:425
Base class for all cover devices.
Definition cover.h:111
optional< GateStatus > read_gate_status_()
void send_message_(MessageType t, T r)
void recalibrate_duration_(GateStatus s)
optional< float > target_position_
void send_gate_command_(GateStatus s)
void control(const cover::CoverCall &call) override
void set_close_duration(uint32_t duration)
void control_position_(float target)
void handle_gate_status_(GateStatus s)
cover::CoverTraits get_traits() override
void set_open_duration(uint32_t duration)
void publish_state(bool save=true, uint32_t ratelimit=0)
uint8_t duration
Definition msa3xx.h:0
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7