diff --git a/components/aux_ac/aux_ac.h b/components/aux_ac/aux_ac.h index 850e57c..baa9133 100644 --- a/components/aux_ac/aux_ac.h +++ b/components/aux_ac/aux_ac.h @@ -49,7 +49,7 @@ public: static const uint32_t AC_STATES_REQUEST_INTERVAL; }; -const std::string Constants::AC_ROVEX_FIRMWARE_VERSION = "0.2.0"; +const std::string Constants::AC_ROVEX_FIRMWARE_VERSION = "0.2.1"; const char *const Constants::TAG = "AirCon"; const std::string Constants::MUTE = "mute"; const std::string Constants::TURBO = "turbo"; diff --git a/components/aux_ac/climate.py b/components/aux_ac/climate.py index 0b7b0d9..c781771 100644 --- a/components/aux_ac/climate.py +++ b/components/aux_ac/climate.py @@ -15,7 +15,6 @@ from esphome.const import ( ICON_THERMOMETER, DEVICE_CLASS_TEMPERATURE, STATE_CLASS_MEASUREMENT, - DEVICE_CLASS_EMPTY, ) from esphome.components.climate import ( ClimateMode, @@ -102,11 +101,10 @@ CONFIG_SCHEMA = cv.All( } ), cv.Optional(CONF_DISPLAY_STATE): binary_sensor.binary_sensor_schema( - icon=ICON_DISPLAY, - device_class=DEVICE_CLASS_EMPTY, + icon=ICON_DISPLAY ).extend( { - cv.Optional(CONF_INTERNAL, default="true"): cv.boolean, + cv.Optional(CONF_INTERNAL, default="true"): cv.boolean } ), cv.Optional(CONF_SUPPORTED_MODES): cv.ensure_list(validate_modes), diff --git a/tests/test-ext.yaml b/tests/test-ext.yaml index b31e10e..718bb64 100644 --- a/tests/test-ext.yaml +++ b/tests/test-ext.yaml @@ -60,6 +60,10 @@ climate: name: AC Indoor Temperature id: ac_indoor_temp internal: false # сенсор установлен как внутренний по дефолту (не попадёт в Home Assistant) + display_state: + name: AC Display State + id: ac_display_state + internal: false # сенсор установлен как внутренний по дефолту (не попадёт в Home Assistant) visual: min_temperature: 16 max_temperature: 32 @@ -83,4 +87,19 @@ climate: supported_swing_modes: - VERTICAL - HORIZONTAL - - BOTH \ No newline at end of file + - BOTH + + +switch: + - platform: template + name: AC Display + lambda: |- + if (ac_display_state).state) { + return true; + } else { + return false; + } + turn_on_action: + - aux_ac.display_on: aux_id + turn_off_action: + - aux_ac.display_off: aux_id \ No newline at end of file