ESPHome 2025.5.0
Loading...
Searching...
No Matches
mcp4461_output.h
Go to the documentation of this file.
1#pragma once
2
3#include "../mcp4461.h"
7
8namespace esphome {
9namespace mcp4461 {
10
11class Mcp4461Wiper : public output::FloatOutput, public Parented<Mcp4461Component> {
12 public:
13 Mcp4461Wiper(Mcp4461Component *parent, Mcp4461WiperIdx wiper) : parent_(parent), wiper_(wiper) {}
16 void set_level(float state);
19 void set_state(bool state) override;
21 void turn_on() override;
23 void turn_off() override;
26 float read_state();
29 float update_state();
31 void increase_wiper();
33 void decrease_wiper();
36 void enable_terminal(char terminal);
39 void disable_terminal(char terminal);
40
41 protected:
42 void write_state(float state) override;
45 float state_;
46};
47
48} // namespace mcp4461
49} // namespace esphome
Helper class to easily give an object a parent of type T.
Definition helpers.h:538
void set_level(float state)
Set level of wiper.
void disable_terminal(char terminal)
Disable given terminal.
float update_state()
Update current output state using device wiper state.
void turn_on() override
Enables current output.
void set_state(bool state) override
Enables/Disables current output using bool parameter.
float read_state()
Read current device wiper state without updating internal output state.
void turn_off() override
Disables current output.
void decrease_wiper()
Decrease wiper by 1 tap.
Mcp4461Wiper(Mcp4461Component *parent, Mcp4461WiperIdx wiper)
void write_state(float state) override
void increase_wiper()
Increase wiper by 1 tap.
void enable_terminal(char terminal)
Enable given terminal.
Base class for all output components that can output a variable level, like PWM.
bool state
Definition fan.h:0
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7