7 static const char *
const TAG =
"yashima.climate";
111 if (restore.has_value()) {
112 restore->apply(
this);
144 switch (this->
mode) {
170 safecelsius = std::min(safecelsius, YASHIMA_TEMP_MAX);
179 data->mark(YASHIMA_HEADER_MARK);
180 data->space(YASHIMA_HEADER_SPACE);
182 for (uint8_t i : remote_state) {
183 for (int8_t j = 7; j >= 0; j--) {
184 data->mark(YASHIMA_BIT_MARK);
185 bool bit = i & (1 << j);
186 data->space(bit ? YASHIMA_ONE_SPACE : YASHIMA_ZERO_SPACE);
190 data->mark(YASHIMA_BIT_MARK);
191 data->space(YASHIMA_GAP);
const uint16_t YASHIMA_BIT_MARK
This class is used to encode all control actions on a climate device.
const uint8_t YASHIMA_MODE_HEAT_BYTE0
void add_on_state_callback(std::function< void(float)> &&callback)
Add a callback that will be called every time a filtered value arrives.
void set_visual_temperature_step(float temperature_step)
float target_temperature
The target temperature of the climate device.
const uint8_t YASHIMA_MODE_DRY_BYTE5
void set_carrier_frequency(uint32_t carrier_frequency)
const optional< ClimateMode > & get_mode() const
This class contains all static data for climate devices.
const uint8_t YASHIMA_BASE_BYTE1
void set_visual_min_temperature(float visual_min_temperature)
The climate device is set to heat to reach the target temperature.
const uint16_t YASHIMA_ONE_SPACE
const uint8_t YASHIMA_TEMP_MAP_BYTE1[YASHIMA_TEMP_RANGE]
ClimateMode mode
The active mode of the climate device.
const uint8_t YASHIMA_TEMP_RANGE
float current_temperature
The current temperature of the climate device, as reported from the integration.
void transmit_state_()
Transmit via IR the state of this climate controller.
const uint16_t YASHIMA_HEADER_MARK
const uint8_t YASHIMA_BASE_BYTE8
const uint16_t YASHIMA_STATE_LENGTH
const uint8_t YASHIMA_FAN_LOW_BYTE2
The climate device is set to cool to reach the target temperature.
float state
This member variable stores the last state that has passed through all filters.
const uint16_t YASHIMA_ZERO_SPACE
const uint8_t YASHIMA_FAN_HIGH_BYTE2
void set_supported_modes(std::set< ClimateMode > modes)
const uint8_t YASHIMA_MODE_OFF_BYTE5
const uint8_t YASHIMA_FAN_AUTO_BYTE2
void set_visual_max_temperature(float visual_max_temperature)
const uint8_t YASHIMA_MODE_AUTO_BYTE0
The climate device is set to heat/cool to reach the target temperature.
const uint8_t YASHIMA_BASE_BYTE0
const optional< float > & get_target_temperature() const
void publish_state()
Publish the state of the climate device, to be called from integrations.
const uint8_t YASHIMA_MODE_OFF_BYTE0
RemoteTransmitData * get_data()
The climate device is off.
const uint8_t YASHIMA_BASE_BYTE6
const uint8_t YASHIMA_FAN_MEDIUM_BYTE2
const uint8_t YASHIMA_BASE_BYTE2
const uint8_t YASHIMA_TEMP_MAX
const uint8_t YASHIMA_BASE_BYTE7
const uint8_t YASHIMA_MODE_AUTO_BYTE5
const uint8_t YASHIMA_MODE_FAN_BYTE0
const uint8_t YASHIMA_MODE_COOL_BYTE0
Implementation of SPI Controller mode.
const uint8_t YASHIMA_BASE_BYTE4
void set_supports_two_point_target_temperature(bool supports_two_point_target_temperature)
optional< ClimateDeviceRestoreState > restore_state_()
Restore the state of the climate device, call this from your setup() method.
const uint8_t YASHIMA_MODE_FAN_BYTE5
void set_supports_current_temperature(bool supports_current_temperature)
void control(const climate::ClimateCall &call) override
Override control to change settings of the climate device.
const uint8_t YASHIMA_MODE_HEAT_BYTE5
remote_transmitter::RemoteTransmitterComponent * transmitter_
const uint8_t YASHIMA_MODE_COOL_BYTE5
const uint16_t YASHIMA_BITS
void add_supported_mode(ClimateMode mode)
const uint16_t YASHIMA_HEADER_SPACE
const uint32_t YASHIMA_CARRIER_FREQUENCY
const uint8_t YASHIMA_BASE_BYTE3
const uint8_t YASHIMA_MODE_DRY_BYTE0
const uint8_t YASHIMA_TEMP_MIN
climate::ClimateTraits traits() override
Return the traits of this controller.
const uint8_t YASHIMA_BASE_BYTE5
const uint32_t YASHIMA_GAP