Update panasonic_heatpump_climate.h
This commit is contained in:
parent
213a08504a
commit
0c0a6769f6
|
|
@ -5,42 +5,47 @@
|
|||
#include "../decode.h"
|
||||
#include "../commands.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace panasonic_heatpump {
|
||||
enum ClimateIds : uint8_t {
|
||||
CONF_CLIMATE_TANK,
|
||||
CONF_CLIMATE_ZONE1,
|
||||
CONF_CLIMATE_ZONE2,
|
||||
};
|
||||
|
||||
namespace esphome
|
||||
{
|
||||
namespace panasonic_heatpump
|
||||
{
|
||||
enum ClimateIds : uint8_t
|
||||
{
|
||||
CONF_CLIMATE_TANK,
|
||||
CONF_CLIMATE_ZONE1,
|
||||
CONF_CLIMATE_ZONE2,
|
||||
};
|
||||
class PanasonicHeatpumpClimate : public climate::Climate,
|
||||
public Component,
|
||||
public Parented<PanasonicHeatpumpComponent>,
|
||||
public PanasonicHeatpumpEntity {
|
||||
public:
|
||||
PanasonicHeatpumpClimate() = default;
|
||||
void dump_config() override;
|
||||
climate::ClimateTraits traits() override;
|
||||
void publish_new_state(const std::vector<uint8_t>& data) override;
|
||||
|
||||
class PanasonicHeatpumpClimate : public climate::Climate, public Component,
|
||||
public Parented<PanasonicHeatpumpComponent>, public PanasonicHeatpumpEntity
|
||||
{
|
||||
public:
|
||||
PanasonicHeatpumpClimate() = default;
|
||||
void dump_config() override;
|
||||
climate::ClimateTraits traits() override;
|
||||
void publish_new_state(const std::vector<uint8_t>& data) override;
|
||||
void set_cool_mode(bool value) {
|
||||
this->cool_mode_ = value;
|
||||
}
|
||||
void set_min_temperature(float value) {
|
||||
this->min_temperature_ = value;
|
||||
}
|
||||
void set_max_temperature(float value) {
|
||||
this->max_temperature_ = value;
|
||||
}
|
||||
void set_temperature_step(float value) {
|
||||
this->temperature_step_ = value;
|
||||
}
|
||||
|
||||
void set_cool_mode(bool value) { this->cool_mode_ = value; }
|
||||
void set_min_temperature(float value) { this->min_temperature_ = value; }
|
||||
void set_max_temperature(float value) { this->max_temperature_ = value; }
|
||||
void set_temperature_step(float value) { this->temperature_step_ = value; }
|
||||
protected:
|
||||
void control(const climate::ClimateCall& call) override;
|
||||
uint8_t getClimateMode(const uint8_t input);
|
||||
uint8_t setClimateMode(const climate::ClimateMode mode, const uint8_t byte);
|
||||
|
||||
protected:
|
||||
void control(const climate::ClimateCall &call) override;
|
||||
uint8_t getClimateMode(const uint8_t input);
|
||||
uint8_t setClimateMode(const climate::ClimateMode mode, const uint8_t byte);
|
||||
|
||||
bool cool_mode_ { false };
|
||||
float min_temperature_ { -5.0 };
|
||||
float max_temperature_ { 5.0 };
|
||||
float temperature_step_ { 0.5 };
|
||||
std::set<climate::ClimateMode> supported_modes_ { climate::CLIMATE_MODE_OFF, climate::CLIMATE_MODE_HEAT };
|
||||
};
|
||||
} // namespace panasonic_heatpump
|
||||
} // namespace esphome
|
||||
bool cool_mode_{false};
|
||||
float min_temperature_{-5.0};
|
||||
float max_temperature_{5.0};
|
||||
float temperature_step_{0.5};
|
||||
std::set<climate::ClimateMode> supported_modes_{climate::CLIMATE_MODE_OFF, climate::CLIMATE_MODE_HEAT};
|
||||
};
|
||||
} // namespace panasonic_heatpump
|
||||
} // namespace esphome
|
||||
|
|
|
|||
Loading…
Reference in New Issue