1
0
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:
Keith Burzinski
2024-04-22 23:47:03 -05:00
committed by GitHub
parent fa8d09aca9
commit eb89d99999
37 changed files with 1765 additions and 0 deletions

View File

@@ -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;