7 static const char *
const TAG =
"copy.lock";
LockCall & set_state(LockState state)
Set the state of the lock device.
void set_supported_states(std::set< LockState > states)
std::set< LockState > get_supported_states() const
LockState state
The current reported state of the lock.
void control(const lock::LockCall &call) override
const optional< LockState > & get_state() const
LockCall make_call()
Make a lock device control call, this is used to control the lock device, see the LockCall descriptio...
void dump_config() override
void set_supports_open(bool supports_open)
void set_assumed_state(bool assumed_state)
void add_on_state_callback(std::function< void()> &&callback)
Set callback for state changes.
This class is used to encode all control actions on a lock device.
bool get_assumed_state() const
bool get_requires_code() const
Implementation of SPI Controller mode.
void set_requires_code(bool requires_code)
bool get_supports_open() const
void publish_state(LockState state)
Publish a state to the front-end from the back-end.