mirror of
https://github.com/esphome/esphome.git
synced 2025-10-24 04:33:49 +01:00
Add valve component (#6447)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
@@ -276,6 +276,16 @@ class WebServer : public Controller, public Component, public AsyncWebHandler {
|
||||
std::string lock_json(lock::Lock *obj, lock::LockState value, JsonDetail start_config);
|
||||
#endif
|
||||
|
||||
#ifdef USE_VALVE
|
||||
void on_valve_update(valve::Valve *obj) override;
|
||||
|
||||
/// Handle a valve request under '/valve/<id>/<open/close/stop/set>'.
|
||||
void handle_valve_request(AsyncWebServerRequest *request, const UrlMatch &match);
|
||||
|
||||
/// Dump the valve state as a JSON string.
|
||||
std::string valve_json(valve::Valve *obj, JsonDetail start_config);
|
||||
#endif
|
||||
|
||||
#ifdef USE_ALARM_CONTROL_PANEL
|
||||
void on_alarm_control_panel_update(alarm_control_panel::AlarmControlPanel *obj) override;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user