mirror of
https://github.com/esphome/esphome.git
synced 2025-10-06 20:03:46 +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:
@@ -14,9 +14,9 @@ static const char *const TAG = "mqtt.fan";
|
||||
|
||||
using namespace esphome::fan;
|
||||
|
||||
MQTTFanComponent::MQTTFanComponent(FanState *state) : state_(state) {}
|
||||
MQTTFanComponent::MQTTFanComponent(Fan *state) : state_(state) {}
|
||||
|
||||
FanState *MQTTFanComponent::get_state() const { return this->state_; }
|
||||
Fan *MQTTFanComponent::get_state() const { return this->state_; }
|
||||
std::string MQTTFanComponent::component_type() const { return "fan"; }
|
||||
const EntityBase *MQTTFanComponent::get_entity() const { return this->state_; }
|
||||
|
||||
|
Reference in New Issue
Block a user