Skip to content

Commit

Permalink
#4 o2 support fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
dentra committed Jan 25, 2024
1 parent 94561be commit 4b55b74
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 3 deletions.
2 changes: 2 additions & 0 deletions components/tion-api/tion-api-o2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,5 +187,7 @@ bool TionO2Api::send_work_mode(uint8_t work_mode) const {
return this->write_frame(FRAME_TYPE_SET_WORK_MODE_REQ_04, data);
}

bool TionO2Api::reset_filter(const tiono2_state_t &state, uint32_t request_id) const { return false; }

} // namespace tion_o2
} // namespace dentra
2 changes: 1 addition & 1 deletion components/tion-api/tion-api-uart-o2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ void TionO2UartProtocol::skip_uart_data_(tion::TionUartReader *io) {
// read out all uart data, so we can start from command delay
while (io->available()) {
io->read_array(buf, 1);
ESP_LOGD(TAG, "Skipped %02X", *buf);
TION_LOGD(TAG, "Skipped %02X", *buf);
}
this->frame_size_ = 0;
}
Expand Down
7 changes: 7 additions & 0 deletions components/tion_o2/climate/tion_o2_climate.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ class TionO2Climate : public TionClimateComponent<TionO2Api> {
void control_climate_state(climate::ClimateMode mode, uint8_t fan_speed, float target_temperature,
TionClimateGatePosition gate_position) override;

void control_buzzer_state(bool state) {
// FIXME implement buzzer support
// ControlState control{};
// control.buzzer = state;
// this->control_state_(control);
}

protected:
struct ControlState {
optional<bool> power_state;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import esphome.codegen as cg
import esphome.config_validation as cv

from .. import tion, vport # pylint: disable=relative-beyond-top-level
# pylint: disable-next=relative-beyond-top-level
from ... import tion, vport

AUTO_LOAD = ["vport", "tion"]

Expand Down
2 changes: 1 addition & 1 deletion tion.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ wifi:

# Virtual port configuration
vport:
- platform: tion_{{ type }}{{ "_uart" if port == "uart" else "" }}
- platform: tion_{{ type }}{{ "_uart" if port == "uart" and type != "o2" else "" }}
id: tion_{{ port }}_vport
{%- if port == "ble" %}
ble_client_id: tion_{{ port }}_client
Expand Down

0 comments on commit 4b55b74

Please sign in to comment.