mirror of
https://github.com/esphome/esphome.git
synced 2025-10-24 20:53:48 +01:00
Refactor fan platform to resemble climate/cover platforms (#2848)
Co-authored-by: Oxan van Leeuwen <oxan@oxanvanleeuwen.nl> Co-authored-by: rob-deutsch <robzyb+altgithub@gmail.com> Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
@@ -128,13 +128,13 @@ class WebServer : public Controller, public Component, public AsyncWebHandler {
|
||||
#endif
|
||||
|
||||
#ifdef USE_FAN
|
||||
void on_fan_update(fan::FanState *obj) override;
|
||||
void on_fan_update(fan::Fan *obj) override;
|
||||
|
||||
/// Handle a fan request under '/fan/<id>/</turn_on/turn_off/toggle>'.
|
||||
void handle_fan_request(AsyncWebServerRequest *request, const UrlMatch &match);
|
||||
|
||||
/// Dump the fan state as a JSON string.
|
||||
std::string fan_json(fan::FanState *obj);
|
||||
std::string fan_json(fan::Fan *obj);
|
||||
#endif
|
||||
|
||||
#ifdef USE_LIGHT
|
||||
|
||||
Reference in New Issue
Block a user