1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-25 21:23:53 +01:00

add support for climate action (#720)

* add support for climate action:

Following hass implementation of climate, action represents the current action the climate device is perfoming, e.g. cooling or heating

fix bang_bang climate:

make sure that the thresholds are always respected.
fixes the issue where the component would just keep on heating, regardless of the temperature range

* Updates

- Use dedicated enum for action (otherwise it gets confusing because "auto" is not a valid action)
- Add field to tell HA that action is supported
- Revert semantic changes in bang_bang

* Conditional print


Co-authored-by: Otto Winter <otto@otto-winter.com>
This commit is contained in:
Marcel van der Veldt
2019-10-18 10:39:14 +02:00
committed by Otto Winter
parent 22aecdfc6f
commit 72d6471ab8
12 changed files with 101 additions and 25 deletions

View File

@@ -121,6 +121,8 @@ class Climate : public Nameable {
/// The active mode of the climate device.
ClimateMode mode{CLIMATE_MODE_OFF};
/// The active state of the climate device.
ClimateAction action{CLIMATE_ACTION_OFF};
/// The current temperature of the climate device, as reported from the integration.
float current_temperature{NAN};