Skip to content

Commit

Permalink
builds errors
Browse files Browse the repository at this point in the history
  • Loading branch information
echavet committed Jan 20, 2025
1 parent 2e22283 commit 6537cf4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
26 changes: 17 additions & 9 deletions components/cn105/climate.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
import esphome.codegen as cg
import esphome.config_validation as cv
from esphome.components import climate, uart, select, sensor, binary_sensor, text_sensor
from esphome.components import (
climate,
uart,
select,
sensor,
binary_sensor,
text_sensor,
uptime,
)

from esphome.components.logger import HARDWARE_UART_TO_SERIAL
from esphome.components.uart import UARTParityOptions
Expand Down Expand Up @@ -63,13 +71,9 @@
"CompressorFrequencySensor", sensor.Sensor, cg.Component
)

InputPowerSensor = cg.global_ns.class_(
"InputPowerSensor", sensor.Sensor, cg.Component
)
InputPowerSensor = cg.global_ns.class_("InputPowerSensor", sensor.Sensor, cg.Component)

kWhSensor = cg.global_ns.class_(
"kWhSensor", sensor.Sensor, cg.Component
)
kWhSensor = cg.global_ns.class_("kWhSensor", sensor.Sensor, cg.Component)

RuntimeHoursSensor = cg.global_ns.class_(
"RuntimeHoursSensor", sensor.Sensor, cg.Component
Expand Down Expand Up @@ -168,11 +172,15 @@ def valid_uart(uart):
cv.Optional(CONF_UPDATE_INTERVAL, default="2s"): cv.All(cv.update_interval),
cv.Optional(CONF_HORIZONTAL_SWING_SELECT): SELECT_SCHEMA,
cv.Optional(CONF_VERTICAL_SWING_SELECT): SELECT_SCHEMA,
cv.Optional(CONF_COMPRESSOR_FREQUENCY_SENSOR): COMPRESSOR_FREQUENCY_SENSOR_SCHEMA,
cv.Optional(
CONF_COMPRESSOR_FREQUENCY_SENSOR
): COMPRESSOR_FREQUENCY_SENSOR_SCHEMA,
cv.Optional(CONF_INPUT_POWER_SENSOR): INPUT_POWER_SENSOR_SCHEMA,
cv.Optional(CONF_KWH_SENSOR): KWH_SENSOR_SCHEMA,
cv.Optional(CONF_RUNTIME_HOURS_SENSOR): RUNTIME_HOURS_SENSOR_SCHEMA,
cv.Optional(CONF_OUTSIDE_AIR_TEMPERATURE_SENSOR): OUTSIDE_AIR_TEMPERATURE_SENSOR_SCHEMA,
cv.Optional(
CONF_OUTSIDE_AIR_TEMPERATURE_SENSOR
): OUTSIDE_AIR_TEMPERATURE_SENSOR_SCHEMA,
cv.Optional(CONF_ISEE_SENSOR): ISEE_SENSOR_SCHEMA,
cv.Optional(CONF_STAGE_SENSOR): STAGE_SENSOR_SCHEMA,
cv.Optional(CONF_SUB_MODE_SENSOR): SUB_MODE_SENSOR_SCHEMA,
Expand Down
2 changes: 1 addition & 1 deletion components/cn105/cn105.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class CN105Climate : public climate::Climate, public Component, public uart::UAR
sensor::Sensor* runtime_hours_sensor_ =
nullptr; // Sensor to store compressor frequency
sensor::Sensor* outside_air_temperature_sensor_ =
nullptr; // Outside air temperature
nullptr; // Outside air temperature

// sensor to monitor heatpump connection time
uptime::HpUpTimeConnectionSensor* hp_uptime_connection_sensor_ = nullptr;
Expand Down

0 comments on commit 6537cf4

Please sign in to comment.