Git Product home page Git Product logo

swingerman / ha-dual-smart-thermostat Goto Github PK

View Code? Open in Web Editor NEW
96.0 4.0 16.0 403 KB

The `dual_smart_thermostat` is an enhaced verion of generic thermostat implemented in Home Assistant. It uses several sensors and dedicated switches connected to a heater and air conditioning under the hood.

Home Page: https://github.com/swingerman/ha-dual-thermostat

License: Apache License 2.0

Shell 0.35% Python 99.61% Dockerfile 0.03% JavaScript 0.01%
home-automation thermostat hacs

ha-dual-smart-thermostat's Introduction

Home Assistant Dual Smart Thermostat component

The dual_smart_thermostat is an enhanced version of generic thermostat implemented in Home Assistant.

hacs_badge Release Donate

Table of contents

Features

Heater/Cooler Mode
Heater Only Mode
Two Stage (AUX) Heating Mode
Fan Only mode
Fan With Cooler mode
Cooler Only mode
Floor Temperature Control
Window/Door sensor integration
Presets
HVAC Action Reason

Heat/Cool Mode

If both heater and cooler entities configured. The thermostat can control heaing and cooling and you sare able to set min/max low and min/max high temperatures. In this mode you can turn the thermostat to heat only, cooler only and back to heat/cool mode.

Heat/Cool With Fan Mode

If the fan entity is set the thermostat can control the fan mode of the AC. The fan will turn on when the temperature is above the target temperature and the fan_hot_tolerance is not reached. If the temperature is above the target temperature and the fan_hot_tolerance is reached the AC will turn on.

all features ⤴️

Heater Only Mode

If only the heater entity is set the thermostat works only in heater mode.

all features ⤴️

Two Stage (AUX) Heating

Two stage or AUX heating can be enabled by adding the required configuration entities: secondary_heater, secondary heater_timeout. If these are set the feature will enable automatically. Optionally you can set secondary heater_dual_mode to true to turn on the secondary heater together with the primary heater.

How Two Stage Heating Works?

If the timeout ends and the heater was on for the whole time the thermostate switches to the secondary heater. In this case the primarey heater (heater) will be turned off. This will be remembered for the day it turned on and in the next heating cycle the secondary heater will turn on automatically. On the next day the primary heater will turn on again the second stage will again only turn on after a timeout. If the third secondary heater_dual_mode is set to true the secondary heater will be turned on together with the primary heater.

Two Stage Heating Example

secondary_heater: switch.study_secondary_heater   # <-- required
secondar_heater_timeout: 00:00:30                 # <-- required
secondar_heater_dual_mode: true                   # <-- optional

Fan Only Mode

If the fan_mode entity is set to true the thermostat works only in fan mode. The heater entity will be treated as a fan only device.

Fan Only Mode Example

heater: switch.study_heater
fan_mode: true

Fan With Cooler Mode

If the ac_mode is set to true and the fan entity is also set, the heater entity will be treated as a cooler (AC) device with an additional fan device. This will allow not only to use a separate physical fan device but also to turn on the fan mode of an AC using advanced switches. With this setup, you can use the fan mode of your AC in a simpler way.

Fan With Cooler Mode Example

heater: switch.study_heater
ac_mode: true
fan: switch.study_fan

Fan Hot Toelerance

If you also set the fan_hot_tolerance the fan will turn on when the temperature is above the target temperature and the fan_hot_tolerance is not reached. If the temperature is above the target temperature and the fan_hot_tolerance is reached the AC will turn on.

Cooler With Auto Fan Mode Example
heater: switch.study_heater
ac_mode: true
fan: switch.study_fan
fan_hot_tolerance: 0.5

Outside Temperature And Fan Hot Tolerance

If you set the fan_hot_tolerance, outside_sensor and the fan_air_outside the fan will turn on only if the outside temperature is colder than the inside temperature and the fan_hot_tolerance is not reached. If the outside temperature is colder than the inside temperature and the fan_hot_tolerance is reached the AC will turn on.

AC With Fan Switch Support

Some AC systems have independent fan controls to cycle the house air for filtering or humidity control; without using the heating or cooling elements. Central AC systems require the thermostat to turn on both the AC wire ("Y" wire) and the air-handler/fan wire ("G" wire) in order to activate the AC

This feature let's you do just that.

In order to use this feature you need to set the heater entity, the ac_mode, the fan) entity and the fan_on_with_ac to true.

example

heater: switch.study_heater
ac_mode: true
fan: switch.study_fan
fan_on_with_ac: true

Cooler Only Mode

If only the cooler entity is set the thermostat works only in cooling mode.

all features ⤴️

Openings

The dual_smart_thermostat can turn off heating or cooling if a window or door is opened and turn heating or cooling back on when the door or window is closed to save energy. The openings configuration variable accepts a list of opening entities and opening objects.

Opening entities and objects

An opening entity is a sensor that can be in two states: on or off. If the state is on the opening is considered open, if the state is off the opening is considered closed. The opening object can contain a timeout property that defines the time in seconds after which the opening is considered open even if the state is still on. This is useful if you would want to ignor windows opened only for a short time.

Openings Scope

The openings_scope configuration variable defines the scope of the openings. If set to all or not defined, any open openings will turn off the current hvac device and it will be in the idle state. If set, only devices that operating in the defined HVAC modes will be turned off. For example, if set to heat only the heater will be turned off if any of the openings are open.

Openings Scope Configuration

openings_scope: [heat, cool, heat_cool, fan_only]
openings_scope:
  - heat
  - cool

Openings Configuration

# Example configuration.yaml entry
climate:
  - platform: dual_smart_thermostat
    name: Study
    heater: switch.study_heater
    cooler: switch.study_cooler
    openings:
      - binary_sensor.window1
      - binary_sensor.window2
      - entity_id: binary_sensor.window3
        timeout: 00:00:30
    openings_scope: [heat, cool]
    target_sensor: sensor.study_temperature

all features ⤴️

Floor heating temperature control

Maximum floor temperature

The dual_smart_thermostat can turn off if the floor heating reaches the maximum allowed temperature you define in order to protect the floor from overheating and damage. To enable this protection you need to set two variables:

floor_sensor: sensor.floor_temp
max_floor_temp: 28

Minimum floor temperature

The dual_smart_thermostat can turn on if the floor temperature reaches the minimum required temperature you define in order to protect the floor from freezing or to keep it on a comfortbale temperature.

Floor Temperature Control Configuration

# Example configuration.yaml entry
climate:
  - platform: dual_smart_thermostat
    name: Study
    unique_id: study
    heater: switch.study_heater
    cooler: switch.study_cooler
    target_sensor: sensor.study_temperature
    floor_sensor: sensor.floor_temp
    max_floor_temp: 28
    min_floor_temp: 5

all features ⤴️

Presets

Currrnetly supported presets are:

To set presets you need to add entries for them in the configuration file like this:

preset_name:
  temperature: 13
  target_temp_low: 12
  target_temp_high: 14

HVAC Action Reason

State attribute: hvac_action_reason

The dual_smart_thermostat will set the hvac_action attribute to heating, cooling, idle or off based on the current state of the thermostat. The hvac_action attribute is used to indicate the current action of the thermostat. The dual_smart_thermostat will also set the hvac_action_reason attribute based on the current state of the thermostat. The hvac_action_reason attribute is used to indicate the reason for the current action of the thermostat.

HVAC Action Reason values

The hvac_action_reason attribute is grouped by internal and external values. The internal values can be set by the component only and the external values can be set by the user or automations.

HVAC Action Reason Internal values

Value Description
none No action reason
target_temp_not_reached The target temperature has not been reached
target_temp_not_reached_with_fan The target temperature has not been reached trying it with a fan
target_temp_reached The target temperature has been reached
misconfiguration The thermostat is misconfigured
opening The thermostat is idle because an opening is open
limit The thermostat is idle because the floor temperature is at the limit
overheat The thermostat is idle because the floor temperature is too high
TEMPERATURE_SENSOR_TIMED_OUT The thermostat is idle because the temperature sensor is not provided data for the defined time that could indicate a malfunctioning sensor

HVAC Action Reason External values

Value Description
none No action reason
presence the last HVAc action was triggered by presence
schedule the last HVAc action was triggered by schedule
emergency the last HVAc action was triggered by emergency
malfunction the last HVAc action was triggered by malfunction

all features ⤴️

Services

Set HVAC Action Reason

dial_smart_thermostat.set_hvac_action_reason is exposed for automations to set the hvac_action_reason attribute. The service accepts the following parameters:

Parameter Description Type Required
entity_id The entity id of the thermostat string yes
hvac_action_reason The reason for the current action of the thermostat HVACActionReasonExternal yes

Configuration variables

name

(required) (string) Name of thermostat

default: Dual Smart

unique_id

(optional) (string) the unique id for the thermostat. It allows you to customize it in the UI and to assign the component to an area.

_default: none

heater

(required) (string) "entity_id for heater switch, must be a toggle device. Becomes air conditioning switch when ac_mode is set to true"

secondary_heater

(optional, required for two stage heating) (string) "entity_id for secondary heater switch, must be a toggle device.

secondary_heater_timeout

(optional, required for two stage heating) (time, integer) Set a minimum amount of time that the switch specified in the heater option must be in its ON state before secondary heater devices needs to be turned on.

secondar_heater_dual_mode

(optional, (bool) If set true the secondary (aux) heater will be turned on together with the primary heater.

cooler

(optional) (string) "entity_id for cooler switch, must be a toggle device."

fan_mode

(optional) (bool) If set to true the heater entity will be treated as a fan only device.

fan

(optional) (string) "entity_id for fan switch, must be a toggle device."

fan_hot_tolerance

(optional) (float) Set a maximum amount of difference between the temperature read by the sensor specified in the target_sensor option and the target temperature and the hot_tolerance that considered to be ok for the fan to be turned on. For example, if the target temperature is 25 and the hot_tolerance is 1 and the fan_hot_tolerance is 0.5 the fan will start when the sensor equals or goes above 25 but not above 25.5. In that case the AC will turn on.

requires: fan

fan_on_with_ac

(optional) (boolean) If set to true the fan will be turned on together with the AC. This is useful for central AC systems that require the fan to be turned on together with the AC.

requires: fan

fan_air_outside

(optional) (boolean) "If set to true the fan will be turned on only if the outside temperature is colder than the inside temperature and the fan_hot_tolerance is not reached. If the outside temperature is colder than the inside temperature and the fan_hot_tolerance is reached the AC will turn on."

requires: fan , sensor_outside

target_sensor

(required) (string) "entity_id for a temperature sensor, target_sensor.state must be temperature."

target_sensor_safety_delay

(optional) (timedelta) Set a delay for the target sensor to be considered valid. If the sensor is not available for the specified time the thermostat will be turned off.

floor_sensor

(optional) (string) "entity_id for the floor temperature sensor, floor_sensor.state must be temperature."

outside_sensor

(optional) (string) "entity_id for the outside temperature sensor, oustide_sensor.state must be temperature."

openings

(optional) (list) "list of opening entity_id's and/or objects for detecting open widows or doors that will idle the thermostat until any of them are open. Note: if min_floor_temp is set and the floor temperature is below the minimum temperature, the thermostat will not idle even if any of the openings are open."

entity_id: <value>The entity id of the opening bstate sensor (string)

timeout: <value> The time after which the opening is considered open even if the state is still on (timedata)

openings_scope

(optional) (array[string]) "The scope of the openings. If set to [all] or not defined, any open openings will turn off the current hvac device and it will be in the idle state. If set, only devices that operating in the defined HVAC modes will be turned off. For example, if set to heat only the heater will be turned off if any of the openings are open."

default: all

options: - all - heat - cool - heat_cool - fan_only

min_temp

(optional) (float)

default: 7

max_temp

(optional) (float)

default: 35

max_floor_temp

(optional) (float)

default: 28

min_floor_temp

(optional) (float)

target_temp

(optional) (float) Set initial target temperature. If this variable is not set, it will retain the target temperature set before restart if available.

target_temp_low

(optional) (float) Set initial target low temperature. If this variable is not set, it will retain the target low temperature set before restart if available.

target_temp_high

(optional) (float) Set initial target high temperature. If this variable is not set, it will retain the target high temperature set before restart if available.

ac_mode

(optional) (boolean) Set the switch specified in the heater option to be treated as a cooling device instead of a heating device. This parameter will be ignored if cooler entity is defined.

default: false

heat_cool_mode

(optional) (boolean) If variable target_temp_low and target_temp_high are not set, this parameter must be set to true to enable the heat_cool mode.

default: false

min_cycle_duration

(optional) (time, integer) Set a minimum amount of time that the switch specified in the heater and/or cooler option must be in its current state prior to being switched either off or on.

cold_tolerance

(optional) (float) Set a minimum amount of difference between the temperature read by the sensor specified in the target_sensor option and the target temperature that must change prior to being switched on. For example, if the target temperature is 25 and the tolerance is 0.5 the heater will start when the sensor equals or goes below 24.5.

default: 0.3

hot_tolerance

(optional) (float) Set a minimum amount of difference between the temperature read by the sensor specified in the target_sensor option and the target temperature that must change prior to being switched off. For example, if the target temperature is 25 and the tolerance is 0.5 the heater will stop when the sensor equals or goes above 25.5.

default: 0.3

keep_alive

(optional) (time, integer) Set a keep-alive interval. If set, the switch specified in the heater and/or cooler option will be triggered every time the interval elapses. Use with heaters and A/C units that shut off if they don't receive a signal from their remote for a while. Use also with switches that might lose state. The keep-alive call is done with the current valid climate integration state (either on or off).

initial_hvac_mode

(optional) (string) Set the initial HVAC mode. Valid values are off, heat, cool or heat_cool. Value has to be double quoted. If this parameter is not set, it is preferable to set a keep_alive value. This is helpful to align any discrepancies between dual_smart_thermostat heater and cooler state.

NOTE! If this is set, the saved state will not be restored after HA retstarts.

away

(optional) (list) Set the temperatures used by preset_mode: away. If this is not specified, the preset mode feature will not be available.

Possible values are:

temperature: <value> The preset temperature to use in heat or cool mode (float)
target_temp_low: <value> The preset low temperature to use in heat_cool mode (float)
target_temp_high: <value> The preset high temperature to use in heat_cool mode (float)

eco

(optional) (list) Set the temperature used by preset_mode: eco. If this is not specified, the preset mode feature will not be available.

Possible values are:

temperature: <value> The preset temperature to use in heat or cool mode (float)
target_temp_low: <value> The preset low temperature to use in heat_cool mode (float)
target_temp_high: <value> The preset high temperature to use in heat_cool mode (float)

home

(optional) (list) Set the temperature used by preset_mode: home. If this is not specified, the preset mode feature will not be available.

Possible values are:

temperature: <value> The preset temperature to use in heat or cool mode (float)
target_temp_low: <value> The preset low temperature to use in heat_cool mode (float)
target_temp_high: <value> The preset high temperature to use in heat_cool mode (float)

comfort

(optional) (list) Set the temperature used by preset_mode: comfort. If this is not specified, the preset mode feature will not be available.

Possible values are:

temperature: <value> The preset temperature to use in heat or cool mode (float)
target_temp_low: <value> The preset low temperature to use in heat_cool mode (float)
target_temp_high: <value> The preset high temperature to use in heat_cool mode (float)

sleep

(optional) (list) Set the temperature used by preset_mode: sleep. If this is not specified, the preset mode feature will not be available.

Possible values are:

temperature: <value> The preset temperature to use in heat or cool mode (float)
target_temp_low: <value> The preset low temperature to use in heat_cool mode (float)
target_temp_high: <value> The preset high temperature to use in heat_cool mode (float)

anti_freeze

(optional) (list) Set the temperature used by preset_mode: Anti Freeze. If this is not specified, the preset mode feature will not be available.

Possible values are:

temperature: <value> The preset temperature to use in heat or cool mode (float)
target_temp_low: <value> The preset low temperature to use in heat_cool mode (float)
target_temp_high: <value> The preset high temperature to use in heat_cool mode (float)

activity

(optional) (list) Set the temperature used by preset_mode: Activity. If this is not specified, the preset mode feature will not be available.

Possible values are:

temperature: <value> The preset temperature to use in heat or cool mode (float)
target_temp_low: <value> The preset low temperature to use in heat_cool mode (float)
target_temp_high: <value> The preset high temperature to use in heat_cool mode (float)

boost

(optional) (list) Set the temperature used by preset_mode: Boost. If this is not specified, the preset mode feature will not be available. This preset mode only works in heat or cool mode because boosting temperatures on heat_cools mode will require setting target_temp_low higher than target_temp_high and vica versa.

Possible values are:

temperature: <value> The preset temperature to use in heat or cool mode (float)

precision

(optional) (float) The desired precision for this device. Can be used to match your actual thermostat's precision. Supported values are 0.1, 0.5 and 1.0.

default: 0.5 for Celsius and 1.0 for Fahrenheit.

target_temp_step

(optional) (float) The desired step size for setting the target temperature. Supported values are 0.1, 0.5 and 1.0.

default: Value used for precision

Installation

Installation is via the Home Assistant Community Store (HACS), which is the best place to get third-party integrations for Home Assistant. Once you have HACS set up, simply search the Integrations section for Dual Smart Thermostat.

Heater Mode Example

climate:
  - platform: dual_smart_thermostat
    name: Study
    heater: switch.study_heater
    target_sensor: sensor.study_temperature
    initial_hvac_mode: "heat"

Two Stage Heateing Mode Example

For two stage heating both the heater and secondary_heater must be defined. The secondary_heater will be turned on only if the heater is on for the amount of time defined in secondar_heater_timeout.

climate:
  - platform: dual_smart_thermostat
    name: Study
    heater: switch.study_heater

    secondary_heater: switch.study_secondary_heater # <-requred
    secondar_heater_timeout: 00:00:30 # <-requred

    target_sensor: sensor.study_temperature
    initial_hvac_mode: "heat"

Cooler Mode Example

climate:
  - platform: dual_smart_thermostat
    name: Study
    heater: switch.study_cooler
    ac_mode: true # <-important
    target_sensor: sensor.study_temperature
    initial_hvac_mode: "cool"

Floor Temperature Caps Example

climate:
  - platform: dual_smart_thermostat
    name: Study
    heater: switch.study_heater
    target_sensor: sensor.study_temperature
    initial_hvac_mode: "heat"
    floor_sensor: sensor.floor_temp # <-required
    max_floor_temp: 28 # <-required
    min_floor_temp: 20 # <-required

DUAL Heat-Cool Mode Example

This mode is used when you want (and can) control both the heater and the cooler. In this mode the target_temp_low and target_temp_high must be set. In this mode you can switch between heating and cooling by setting the hvac_mode to heat or cool or heat_cool.

climate:
  - platform: dual_smart_thermostat
    name: Study
    heater: switch.study_heater # <-required
    cooler: switch.study_cooler # <-required
    target_sensor: sensor.study_temperature
    heat_cool_mode: true # <-required
    initial_hvac_mode: "heat_cool"

OPENINGS Example

climate:
  - platform: dual_smart_thermostat
    name: Study
    heater: switch.study_heater
    cooler: switch.study_cooler
    target_sensor: sensor.study_temperature
    openings: # <-required
      - binary_sensor.window1
      - binary_sensor.window2
      - entity_id: binary_sensor.window3
        timeout: 00:00:30 # <-optional

Tolerances

The dual_smart_thermostat has two tolerance variables: cold_tolerance and hot_tolerance. These variables are used to prevent the heater or cooler from switching on and off too frequently. For example, if the target temperature is 25 and the tolerance is 0.5 the heater will start when the sensor equals or goes below 24.5. The heater will stop when the sensor equals or goes above 25.5. This prevents the heater from switching on and off too frequently when the temperature is close to the target temperature.

If the thermosat is set to heat_cool mode the tolerance will work in the same way for both the heater and the cooler.

climate:
  - platform: dual_smart_thermostat
    name: Study
    heater: switch.study_heater
    cooler: switch.study_cooler
    target_sensor: sensor.study_temperature
    cold_tolerance: 0.3
    hot_tolerance: 0

Full configuration example

climate:
  - platform: dual_smart_thermostat
    name: Study
    heater: switch.study_heater
    cooler: switch.study_cooler
    secondary_heater: switch.study_secondary_heater
    secondar_heater_timeout: 00:00:30
    target_sensor: sensor.study_temperature
    floor_sensor: sensor.floor_temp
    max_floor_temp: 28
    openings:
      - binary_sensor.window1
      - binary_sensor.window2
      - entity_id: binary_sensor.window3
        timeout: 00:00:30
    min_temp: 10
    max_temp: 28
    ac_mode: false
    target_temp: 17
    target_temp_high: 26
    target_temp_low: 23
    cold_tolerance: 0.3
    hot_tolerance: 0
    min_cycle_duration:
      seconds: 5
      seconds: 5
    keep_alive:
      minutes: 3
    initial_hvac_mode: "off" # hvac mode will reset to this value after restart
    away: # this preset will be available for all hvac modes
      temperature: 13
      target_temp_low: 12
      target_temp_high: 14
    home: # this preset will be available only for heat or cool hvac mode
      temperature: 21
    precision: 0.1
    target_temp_step: 0.5

Donate

I am happy tp help the Home Assistant community but I do it in my free time at the cost of spending less time with my family. Feel free to motivate me and appreciate my sacrifice by donating:

Donate coffee

Develpoent

Tsting

Use pytest to run the tests:

pytest

Specific test

pytest tests/test_heater_mode.py

Log Level

pytest --log-cli-level=DEBUG

ha-dual-smart-thermostat's People

Contributors

alvarocarrera avatar dancingcactus avatar dependabot[bot] avatar grantland avatar jwillemsen avatar lord-ne avatar nickrout avatar ollo69 avatar swingerman avatar vlebourl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ha-dual-smart-thermostat's Issues

Request: Added features and extra planning on device logevity

First, thanks for the awesome work! I have been working to get to the point that I could use something like this and the card works well.

I use smart outlets that have kWh and Watt monitoring and I can display that as a prat of the "Simple Thermostat" card that I use. In order to increase the life-span of the AC unit, I previously setup automations that watch for a given temp and if it is after a certain time and if the AC compressor is not running as the wattage value is between 20-60w of power use. This will make sure that the compressor works more efficiently and will last longer in the unit.

I suggest adding a way to monitor the plugs wattage consumption to see if the power meets a window of 20-60w and then allow the switch to turn off. If this can already be done in a different manner, I am not sure how to do it.

Another feature that would be good is if the "off" button is pressed or the mode is set to "off", it should turn off the switch/s that are being used on the thermostat to control the AC/heat. I tried this a couple of times last night and it would only turn off the switch if the temperature conditions were met.
image

How to set time for openings in v0.9.0?

Good news of the new feature on 0.9.0 to set a time for openings, however I check the full configuration example and still have no idea of how to set this open time value.

Could you please suggest? Thanks a lot!

Improvements
feat: open time for openings by @swingerman in #60
You can now define a timeout for each opening by @swingerman in #61

Power consumtion is not working

Carrier Wi-Fi Smart AC has sensor.[climate_name]_total_energy_consumption and sensor.[climate_name]_realtime_power but no one is retrieving the real data

image

Error in getting auto mode to work, seems to only work in either heat, or cool mode

Anytime I try to set the thermostat to auto to control both my AC unit and my heater is throws out an error:

Oct 18 02:08:44 1119n-ha-001 homeassistant[872]: #033[31m2022-10-17 22:08:44.566 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [2625121392] '>=' not supported between instances of 'NoneType' and 'float'
Oct 18 02:08:44 1119n-ha-001 homeassistant[872]: Traceback (most recent call last):
Oct 18 02:08:44 1119n-ha-001 homeassistant[872]:   File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 202, in handle_call_service
Oct 18 02:08:44 1119n-ha-001 homeassistant[872]:     await hass.services.async_call(
Oct 18 02:08:44 1119n-ha-001 homeassistant[872]:   File "/usr/src/homeassistant/homeassistant/core.py", line 1738, in async_call
Oct 18 02:08:44 1119n-ha-001 homeassistant[872]:     task.result()
Oct 18 02:08:44 1119n-ha-001 homeassistant[872]:   File "/usr/src/homeassistant/homeassistant/core.py", line 1775, in _execute_service
Oct 18 02:08:44 1119n-ha-001 homeassistant[872]:     await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
Oct 18 02:08:44 1119n-ha-001 homeassistant[872]:   File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 207, in handle_service
Oct 18 02:08:44 1119n-ha-001 homeassistant[872]:     await service.entity_service_call(
Oct 18 02:08:44 1119n-ha-001 homeassistant[872]:   File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 678, in entity_service_call
Oct 18 02:08:44 1119n-ha-001 homeassistant[872]:     future.result()  # pop exception if have
Oct 18 02:08:44 1119n-ha-001 homeassistant[872]:   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 931, in async_request_call
Oct 18 02:08:44 1119n-ha-001 homeassistant[872]:     await coro
Oct 18 02:08:44 1119n-ha-001 homeassistant[872]:   File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 715, in _handle_entity_call
Oct 18 02:08:44 1119n-ha-001 homeassistant[872]:     await result
Oct 18 02:08:44 1119n-ha-001 homeassistant[872]:   File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 613, in async_service_temperature_set
Oct 18 02:08:44 1119n-ha-001 homeassistant[872]:     await entity.async_set_temperature(**kwargs)
Oct 18 02:08:44 1119n-ha-001 homeassistant[872]:   File "/config/custom_components/dual_smart_thermostat/climate.py", line 589, in async_set_temperature
Oct 18 02:08:44 1119n-ha-001 homeassistant[872]:     await self._async_control_climate()
Oct 18 02:08:44 1119n-ha-001 homeassistant[872]:   File "/config/custom_components/dual_smart_thermostat/climate.py", line 662, in _async_control_climate
Oct 18 02:08:44 1119n-ha-001 homeassistant[872]:     await self._async_control_heat_cool(time, force)
Oct 18 02:08:44 1119n-ha-001 homeassistant[872]:   File "/config/custom_components/dual_smart_thermostat/climate.py", line 793, in _async_control_heat_cool
Oct 18 02:08:44 1119n-ha-001 homeassistant[872]:     too_cold = self._is_too_cold("_target_temp_low")
Oct 18 02:08:44 1119n-ha-001 homeassistant[872]:   File "/config/custom_components/dual_smart_thermostat/climate.py", line 988, in _is_too_cold
Oct 18 02:08:44 1119n-ha-001 homeassistant[872]:     return target_temp >= self._cur_temp + self._cold_tolerance
Oct 18 02:08:44 1119n-ha-001 homeassistant[872]: TypeError: '>=' not supported between instances of 'NoneType' and 'float'#033[0m

And here is my config that I'm using to try to drive it:

climate:
  - platform: dual_smart_thermostat
    unique_id: "c135dffc-8fae-4ef0-b3f8-0aa2c1af8c2f"
    name: Bedroom Thermostat
    ac_mode: false
    cooler: input_boolean.input_boolean_bedroom_fan
    heater: input_boolean.input_boolean_bedroom_convector
    target_sensor: sensor.bedroom
    target_temp: 72
    initial_hvac_mode: "heat_cool"
    min_cycle_duration:
      seconds: 5
    cold_tolerance: 0.3
    hot_tolerance: 0.3
    min_temp: 40
    max_temp: 85
    comfort_temp: 72

Any help would be MUCH appreciated... this is exactly the dual mode type of thermostat I need with separate heating and cooling units!

Feature Request - open time for openings

It would be great if we could specify how long an opening is open before adjusting the thermostat.

For example, I have my back door as an opening and the ac will turn off when it's opened, but sometimes you're just opening it to go outside, not to leave it open. So instead of the ac turning on and off on and off it would be nice to set a time limit for how long the door needs to be open before any changes happen to the thermostat.

hvac_mode is "heat", but hvac_action shows "cooling"

  1. Issue: hvac_action incorrectly shows Cooling when in heat mode:

When hvac_mode is Cool, hvac_action is correctly displayed as Cooling.

  1. Another issue is when I increase the setpoint, the hvac_mode toggles between idle and cooling on every setpoint change:
    image

Same behaviour with Cool mode.

My setup is in #42.

Switch gets randomly turned on and off

I'm trying to wrap my head around the behavior this component seems to take. Before is my config.
` platform: dual_smart_thermostat

name: Virtual Bedroom
heater: switch.bedroom_ac_heat
cooler: switch.bedroom_ac_cool
target_sensor: sensor.bedroom_temperature_sensor_temperature
min_temp: 55
max_temp: 80
ac_mode: false
target_temp: 68
target_temp_high: 73
target_temp_low: 68
cold_tolerance: 0.5
hot_tolerance: 0.5
min_cycle_duration:
  minutes: 2
initial_hvac_mode: "heat_cool"
away_temp: 60
precision: 0.1`

For some reason, despite the temperature being outside the target temp and tolerance, the component keeps turning the switch on and off repeatedly. See log of the switch.

Screenshot_20220401-153729_Home Assistant

Any ideas why this would be happening? Is it an issue with my config? What's weird to me is that it's toggling the switch faster than the minimal cycle duration. Any help would be greatly appreciated.

"hot_tolerance" not woking as expected when in heat_cool mode

Hi,

I've discovered an issue when setting the thermostat in heat_cool mode.
A bit of context first. Until now I've been using ha-dual-smart-thermostat for a room where there's only a heater without issue. I've configured it to reach 20ºC with both "hot_tolerance" and "cold_tolerance" set to 0.3. (full config below). It's been woking as expected, when temperature falls below 19.7ºC the heater starts and when it reaches 20.3 the heater stops, see the graph:
image

Seeing it is working perfectly I'm in the process of implementing it on other rooms in my home using the advantage of heat_cool mode for an HVAC appliance. The issue I've encountered is that this behaviour is not the same. I've configured other thermostat with "target_temp_low: 21" for winter and "target_temp_high: 24" for summer with hot and cold tolerance set to 0.3 as before. My idea is that the thermostat brings online the heater when the temperature is below 20.7ºC and shut it off when temp is above 21.3ºC and the AC should switch on when temp reaches 24.3ºC and shut off when it falls below 23.7ºC. The problem is that the thermostat is not doing that. I've not been able to test the "summer" setting yet but in "winter" setting the thermostat seems to be activating the heater when temp is below 20.7ºC but it shuts the heater off on the next cycle of the temp sensor, at around 20.9ºC. My guess is that tolerances are not working properly. See the screenshot(I configured the thermostat around 14:30)
image

I've been having a look to the code and I think I've find at least part of the problem. (I'm no developer and last time I wrote code was in college in C++ so take this with a grain of salt ;) ). What I found is that tolerances for heat_cool mode are checked on lines 877 and 878 on climate.py using "target_temp_low" and "target_temp_high" as argument but when in heat mode are checked w/o argument, thus checking the same value. I believe on heat_cool mode the heating or cooling mode should be taken into account maybe something like this:
if self._is_heater_active:
too_cold = self._is_too_cold("_target_temp_low")
too_hot = self._is_too_hot("_target_temp_low")
elif self._is_cooler_active:
too_cold = self._is_too_cold("_target_temp_high")
too_hot = self._is_too_hot("_target_temp_high")
else:
too_cold = self._is_too_cold("_target_temp_low")
too_hot = self._is_too_hot("_target_temp_high")

I'm attaching my config for both thermostats so hopefully you can reproduce the issue:

  • platform: dual_smart_thermostat
    name: termostato_dormitorio
    heater: switch.radiador_dormitorio
    target_sensor: sensor.sensor_dormitorio_temperature
    openings:

    • binary_sensor.ventana_de_la_escalera_contact
    • binary_sensor.puerta_de_casa_contact
      target_temp: 20
      cold_tolerance: 0.3
      hot_tolerance: 0.3
      min_cycle_duration:
      seconds: 30
      initial_hvac_mode: heat
      away:
      temperature: 15
      home:
      temperature: 17
      comfort:
      temperature: 20
  • platform: dual_smart_thermostat
    name: termostato_salon
    heater: switch.calefaccion_salon
    cooler: switch.refrigeracion_salon
    target_sensor: sensor.sensor_salon_temperature
    openings:

    • binary_sensor.ventana_de_la_escalera_contact
    • binary_sensor.puerta_de_casa_contact
      heat_cool_mode: true
      target_temp_low: 17
      target_temp_high: 27
      cold_tolerance: 0.3
      hot_tolerance: 0.3
      min_cycle_duration:
      minutes: 10
      initial_hvac_mode: heat_cool
      away:
      target_temp_low: 15
      target_temp_high: 30
      home:
      target_temp_low: 17
      target_temp_high: 27
      comfort:
      target_temp_low: 21
      target_temp_high: 24

sleep mode dont pass configuration.yaml.

i can define all modes:

away: # this preset will be available for all hvac modes
      temperature: 13
      target_temp_low: 12
      target_temp_high: 14
    home: # this preset will be available only for heat or cool hvac mode
      temperature: 21
    comfort:
      temperature: 22
    eco:
      temperature: 19
    away:
      temperature: 17
    #sleep:
    #  temperature: 19

but if configure sleep mode, HA show error for sleep mode.

Only HVAC Mode is the initial set

Hi, loving this integration, finally met a need that I was trying to fix. Is it possible to select which HVAC mode the climate integration is on via the Lovelace? Using the developer tools, I can manually set the HVAC to any mode (off, cool, heat, heat_cool) but that option isn't available in Lovelace. See image below.

image

Is this something in the works? Is this a known bug I missed? Thanks in advance.

Minimum cycle time

So I have both generic smart thermostats and dual smart thermostats and the minimum_cycle_time is not working on any of them my config for them all looks the same, any idea what I have done wrong?

climate:

  • platform: dual_smart_thermostat
    name: Left Fridge
    heater: switch.left_fridge_heat
    cooler: switch.left_fridge_cool
    target_sensor: sensor.left_fridge_temperature
    min_temp: 0
    max_temp: 40
    target_temp: 20
    target_temp_high: 24
    target_temp_low: 18
    cold_tolerance: 0.3
    hot_tolerance: 0.3
    min_cycle_duration:
    minutes: 5
    away_temp: 16
    keep_alive:
    minutes: 1
    precision: 0.1

Developer tools - YAML configuration reloading makes current temperature "n/a"

Hello,

my installation is:

Home Assistant 2022.11.4
Supervisor 2022.10.2
Operating System 9.0
Frontend 20221108.0 - latest
-
Home Assistant Dual Smart Thermostat component v0.7.1

This is my config:

climate:
  - platform: dual_smart_thermostat
    name: Test Fake Thermostat
    heater: switch.fake_thermostat_switch
    cooler: switch.fake_thermostat_switch
    target_sensor: sensor.sonoff_zb_temp1_temperature
    openings:
      - binary_sensor.sonoff_zb_ds2_ias_zone
    min_temp: 10
    max_temp: 28
    ac_mode: false
    target_temp: 20
    target_temp_high: 26
    target_temp_low: 19
    cold_tolerance: 0.3
    hot_tolerance: 0
    min_cycle_duration:
      seconds: 5
    keep_alive:
      minutes: 3
    initial_hvac_mode: "off" # hvac mode will reset to this value after restart
    away: # this preset will be available for all hvac modes
      temperature: 15
      target_temp_low: 14
      target_temp_high: 16
    home: # this preset will be available only for heat or cool hvac mode
      temperature: 21
    precision: 0.1
    target_temp_step: 0.5

After reloading the component via "Developer tools - YAML configuration reloading - DUAL_SMART_THERMOSTAT", the current temp becomes n/a.

What fixes this:

  • completely restarting HA,
  • an update of temperature sensor.

Can I use this with thermostats instead of switches?

I'm assuming that ha-dual-smart-thermostat directly starts the heater and cooler.

I'm wondering if it could control thermostats for the heaters and coolers.

My use case is that I would like the AC to start when it's hot and the heat to start when it's cold, but not have them fight each others.

Two items heating

I have an underfloor system where I am opening a valve with your dual smart thermostat. I want also to switch at the same time the pump on. How can I add two (or more) items to the string?
Hope you can help me, thank you.

Example of what I have. I want to add switch.1_kinderkamer_cv3 to the heater:
climate:

  • platform: dual_smart_thermostat
    name: Zolder
    heater:
    switch.1_kinderkamer_cv4
    target_sensor:
    sensor.lumi_lumi_weather_0f08e207_temperature
    min_temp: 15
    max_temp: 22.5
    ac_mode: false
    target_temp: 19
    target_temp_high: 26
    target_temp_low: 23
    hot_tolerance: 0.5
    min_cycle_duration:
    seconds: 10
    keep_alive:
    minutes: 3
    initial_hvac_mode: "off"
    precision: 0.1

min_cycle_duration not working

When setting min_cycle_duration to either seconds: 120 or minutes: 2 I get the same results with my cooling turning off/on every few seconds if the temperature is close to the setpoint.

Is there something I'm missing? I copied it straight from the example config and it still doesn't work as intended.

Openings timeout not working

I have configured the openings like this:

  openings:
    - entity_id: binary_sensor.bedroom_door
      timeout: 00:00:59
    - entity_id: binary_sensor.terrace_door
      timeout: 00:00:59
    - entity_id: binary_sensor.terrace_window
      timeout: 00:00:59

However as soon as I open one of the doors/windows the AC is turned off (there may be a delay of a few seconds but that is probably a delay of the sensor reading itself). The delay of 59 seconds is not taken into account.
Have I configured it wrong or is this a bug?

Feature request: target_sensor not only sensor entity

I'm planning to use this as an extension to a less capable physical thermostat (heat only)
But as the dual_smart_thermostat need the target_sensor to be a thermometer with state as temp I have to go the way around to create a template sensor to extract the actual temperature from my climate entity.
Would like to either allow climate entities as target_sensor, or that you can specify any input formula you want.
E.g. target_sensor: "{{ state_attr('climate.thermostat_hallway', 'current_temperature') }}"

removing "target_temp_high" and/or "target_temp_low" from config removes "heat_cool" mode as well

If I have this config for my thermostat:

  - platform: dual_smart_thermostat
    name: Test Fake Thermostat
    heater: switch.fake_thermostat_switch_heat_gpio27
    cooler: switch.fake_thermostat_switch_cool_gpio27
    target_sensor: sensor.sonoff_zb_temp1_temperature
    # floor_sensor: sensor.floor_temp
    # max_floor_temp: 28
    openings:
      - binary_sensor.sonoff_zb_ds2_ias_zone
    min_temp: 10
    max_temp: 28
    ac_mode: false # this parameter will be ignored if cooler entity is defined.
    target_temp: 20 # If this variable is not set, it will retain the target temperature set before restart if available.
    target_temp_high: 21
    target_temp_low: 20
    cold_tolerance: 0.3
    hot_tolerance: 0
    min_cycle_duration:
      seconds: 1
    keep_alive:
      minutes: 3
    initial_hvac_mode: "heat_cool" # hvac mode will reset to this value after restart
    away: # this preset will be available for all hvac modes
      temperature: 15
      target_temp_low: 14
      target_temp_high: 16
    home: # this preset will be available only for heat or cool hvac mode
      temperature: 21
    precision: 0.1
    target_temp_step: 0.5

It has 4 hvac_modes:

hvac_modes: off, heat, cool, heat_cool
min_temp: 10
max_temp: 28
target_temp_step: 0.5
preset_modes: none, away
current_temperature: 22.9
hvac_action: idle
preset_mode: none
prev_target_temp_low: 20
prev_target_temp_high: 21
friendly_name: Test Fake Thermostat
supported_features: 18
target_temp_high: 21
target_temp_low: 20
prev_target_temp: 20

But if I remove any or all of these parameters:

    target_temp_high: 21
    target_temp_low: 20

then my thermostat loses heat_cool mode:

hvac_modes: off, heat, cool
min_temp: 10
max_temp: 28
target_temp_step: 0.5
preset_modes: none, away
current_temperature: 22.9
hvac_action: idle
preset_mode: none
friendly_name: Test Fake Thermostat
supported_features: 18
target_temp_high: 21
target_temp_low: 20
prev_target_temp_low: 20
prev_target_temp_high: 21
prev_target_temp: 20

Why is that?
I'd like it to keep heat_cool mode and not reset to config target temps, instead retaining the previous UI values - just what the config functionality claims to do.

Tolerance / precision behavior seems wrong

In heating mode, if I have the tolerance set to 1F and the precision to 0.1F, and the setpoint to 68F, it turns on at 66.9F, but turns off right away when it gets to 67.1F. I would expect it to turn on at 66.9F, and turn off at 68F.

Invalid Config with 'heat_cool_mode'

Hello,

I have used this thermostat with heating an cooling for a few months and it had been great. I wanted to tweak some config settings and am having the following error when I try to introduce 'heat_cool_mode' in my configuration.yaml. I am hoping I can get some help with this; maybe my syntax is wrong or I am missing something.

Invalid config for [climate.dual_smart_thermostat]: [heat_cool_mode] is an invalid option for [climate.dual_smart_thermostat]. Check: climate.dual_smart_thermostat->heat_cool_mode. (See ?, line ?).

My config is as follows (I commented out some settings to reduce variables).

climate:                                                                                    # https://www.home-assistant.io/integrations/generic_thermostat
  - platform: dual_smart_thermostat
    name: Pool Hall Thermostat
    heater: switch.plug_e
    cooler: switch.plug_j_switch
    target_sensor: sensor.pool_hall_temperature
    heat_cool_mode: true
    #min_temp: 50
    #max_temp: 80
    #heat_cool_mode: true # @todo causes error?
    #target_temp_low: 50
    #target_temp_high: 80
    #min_cycle_duration:
    #  minutes: 10

I am using Home Assistant 2023.8.1 and Dual Thermostat 0.54.5.

Thanks!
Nick

Feature request: dehumidifier mode

I use thermostat controls to control humidity instead of temperature, e.g. where the sensor entity is a humidity sensor, and the switch entities are a humidifier and a dehumidifier.

image

This all works perfectly with the existing logic. However it would be really nice if there could be an humidifier_mode: true setting that would have the following purely cosmetic changes:

  • Display the unit of measure as "%", (i.e. Percent Humidity)
  • Show "Humidifying"/"Dehumidifying" instead of "Heating"/"Cooling"
  • Show a relevant icon (e.g. mdi:water-percent) instead of the snowflake/flame.

preset mode being set on wrong entity

Hi - got a strange issue here. Looks like my preset modes are being set on the wrong entity. Notice how the "Dining Room" has two preset modes - and the boys room has none. I'm seeing this in other entities, too.
Screenshot 2023-10-17 at 9 44 37 AM

Here is the configuration for these two:

- platform: dual_smart_thermostat
  name: Boys Room
  heater: switch.boys_room_radiator
  cooler: switch.boys_room_air_conditioner
  target_sensor: sensor.boys_room_temperature_temperature
  min_cycle_duration: 60
  precision: .5
  min_temp: 20
  max_temp: 25
  heat_cool_mode: true
  away:
    temperature: 30
    target_temp_low: 50
    target_temp_high: 0

- platform: dual_smart_thermostat
  name: Dining Room
  heater: switch.dining_room_radiator
  target_sensor: sensor.dining_room_thermostat_temperature
  min_cycle_duration: 60
  precision: .5
  min_temp: 20
  max_temp: 25
  away:
    temperature: 15

Is this something on my end? Thanks!

Define custom presets

I don't know if it's possible but it would be great if we can define custom presets. For example the generic_thermostat has activity_temp and the activity preset shows in the Lovelace climate cards as a choice, but dual-smart-thermostat doesn't have that preset. So it would be great to define a custom name preset for example like this:

activity:
    temperature: 26.7

or

some_descriptive_preset:
    temperature: 26.7

This will allow to easily switch the temperature between descriptively name presets
Thank you

Unable to set temperature using lovelace or scheduler component

I have been using the Dual Smart Thermostat since a few months ago and I really love it. Recently I noticed something changed but I haven't been able to figure out what the problem is.

I have been using the custom scheduler component to set different temperatures at different times. It was working fine, but now I am not able to set temperature, only to choose the mode. I am not sure if it is a problem of the Dual Smart Thermostat component or the scheduler component to be honest, or even if it was a change on Home Assistant which made start showing this behaviour.

However, I also have found that if I don't set target_temp_low or target_temp_high in the config, I cannot make any changes on the temperatures later on using lovelace.

I tried installing previous versions of this component and the scheduler component as well, but the issue still remained, so I'm guessing that there may be a change within Home Assistant that now changed the behaviour of one of these components.

Why is target temp step limited to less than or equal to 1?

Can't it be set to what you want?
I understand the normal usage of this integration is house/apartment heating but I'm using it for a BBQ and setting the temperature in 5 or 10 degrees makes more sense.
Is there any reason why this is hardcoded this way?

EDIT; I mean I use the thermostat to track the temperature inside the BBQ not in the meat

Heating mode not remembered

On restarting HA, the thermostat doesn't remember the last setting, unlike native generic thermostat device.

This leaves my heater/cooler running without limit, as the switch entities do remember their last state.

Heater entity turned on in `cool` hvac mode instead of cooler entity

For some reason, the heater entity is turned on when the thermostat is in cool mode. When in heat_cool mode, it correctly activates the cooler and heater entities. Also, the 'Cooling' and 'Heating' labels appear to be missing. 'Off' and 'Idle' are the only ones that show.

image
image

climate.yaml:

  name: Thermostat
  heater: input_boolean.fake_heat
  cooler: input_boolean.fake_ac
  target_sensor: input_number.fake_temp
  min_temp: 50
  max_temp: 80
  ac_mode: false
  # hot_tolerance: 0
  # cold_tolerance: 1
  target_temp: 70
  target_temp_low: 70
  target_temp_high: 75
  # min_cycle_duration:
  #   minutes: 5
  # initial_hvac_mode: "off"
  keep_alive:
    minutes: 1
  away_temp: 58

Temperature not showing up on thermostat

I have set up a number of thermostats in configuration.yaml, as follows. They all appear in my dashboard correctly. I have a number of temperature sensors, appropriately named, configured using mqtt-io running on raspberry pi devices.

However, having seen temperatures for each of the sensors I have so far installed (lounge, studio and family) appearing in their related thermostat individually, I am only seeing one temperature at present on themostats on my dashboard.

MQTT Explorer shows valid messages being received. Also, when I check the HA entities I can see the correct values are being received.

Any ideas why this might be happening?

UPDATE: A few hours and a restart later only the Family Room temp is showing, although all three of the installed thermostats are generating data which can be seen by HA.

climate:

  • platform: dual_smart_thermostat
    name: Study
    heater: switch.study_heater
    cooler: switch.study_cooler
    target_sensor: sensor.study_temperature
    min_temp: 6
    max_temp: 30
    ac_mode: false
    target_temp: 17
    target_temp_high: 26
    target_temp_low: 23
    cold_tolerance: 0.3
    hot_tolerance: 0
    min_cycle_duration:
    seconds: 5
    keep_alive:
    minutes: 3
    initial_hvac_mode: "heat_cool" # hvac mode will reset to this value after restart
    away: # this preset will be available for all hvac modes
    temperature: 13
    target_temp_low: 12
    target_temp_high: 14
    home: # this preset will be available only for heat or cool hvac mode
    temperature: 21
    comfort:
    temperature: 18
    precision: 0.1
    target_temp_step: 0.5
  • platform: dual_smart_thermostat
    name: Bed 1
    heater: switch.bed1_heater
    cooler: switch.bed1_cooler
    target_sensor: sensor.bed1_temperature
    min_temp: 6
    max_temp: 30
    ac_mode: false
    target_temp: 17
    target_temp_high: 26
    target_temp_low: 23
    cold_tolerance: 0.3
    hot_tolerance: 0
    min_cycle_duration:
    seconds: 5
    keep_alive:
    minutes: 3
    initial_hvac_mode: "heat_cool" # hvac mode will reset to this value after restart
    away: # this preset will be available for all hvac modes
    temperature: 13
    target_temp_low: 12
    target_temp_high: 14
    home: # this preset will be available only for heat or cool hvac mode
    temperature: 21
    comfort:
    temperature: 18
    precision: 0.1
    target_temp_step: 0.5
  • platform: dual_smart_thermostat
    name: Bed 2
    heater: switch.bed2_heater
    cooler: switch.bed2_cooler
    target_sensor: sensor.bed2_temperature
    min_temp: 6
    max_temp: 30
    ac_mode: false
    target_temp: 17
    target_temp_high: 26
    target_temp_low: 23
    cold_tolerance: 0.3
    hot_tolerance: 0
    min_cycle_duration:
    seconds: 5
    keep_alive:
    minutes: 3
    initial_hvac_mode: "heat_cool" # hvac mode will reset to this value after restart
    away: # this preset will be available for all hvac modes
    temperature: 13
    target_temp_low: 12
    target_temp_high: 14
    home: # this preset will be available only for heat or cool hvac mode
    temperature: 21
    comfort:
    temperature: 18
    precision: 0.1
    target_temp_step: 0.5
  • platform: dual_smart_thermostat
    name: Bed 3
    heater: switch.bed3_heater
    cooler: switch.bed3_cooler
    target_sensor: sensor.bed3_temperature
    min_temp: 10
    max_temp: 28
    ac_mode: false
    target_temp: 17
    target_temp_high: 26
    target_temp_low: 23
    cold_tolerance: 0.3
    hot_tolerance: 0
    min_cycle_duration:
    seconds: 5
    keep_alive:
    minutes: 3
    initial_hvac_mode: "heat_cool" # hvac mode will reset to this value after restart
    away: # this preset will be available for all hvac modes
    temperature: 13
    target_temp_low: 12
    target_temp_high: 14
    home: # this preset will be available only for heat or cool hvac mode
    temperature: 21
    comfort:
    temperature: 18
    precision: 0.1
    target_temp_step: 0.5
  • platform: dual_smart_thermostat
    name: Bed 4
    heater: switch.bed4_heater
    cooler: switch.bed4_cooler
    target_sensor: sensor.bed4_temperature
    min_temp: 6
    max_temp: 30
    ac_mode: false
    target_temp: 17
    target_temp_high: 26
    target_temp_low: 23
    cold_tolerance: 0.3
    hot_tolerance: 0
    min_cycle_duration:
    seconds: 5
    keep_alive:
    minutes: 3
    initial_hvac_mode: "heat_cool" # hvac mode will reset to this value after restart
    away: # this preset will be available for all hvac modes
    temperature: 13
    target_temp_low: 12
    target_temp_high: 14
    home: # this preset will be available only for heat or cool hvac mode
    temperature: 21
    comfort:
    temperature: 18
    precision: 0.1
    target_temp_step: 0.5
  • platform: dual_smart_thermostat
    name: Family Room
    heater: switch.family_heater
    cooler: switch.family_cooler
    target_sensor: sensor.family_temperature
    min_temp: 10
    max_temp: 28
    ac_mode: false
    target_temp: 17
    target_temp_high: 26
    target_temp_low: 23
    cold_tolerance: 0.3
    hot_tolerance: 0
    min_cycle_duration:
    seconds: 5
    keep_alive:
    minutes: 3
    initial_hvac_mode: "heat_cool" # hvac mode will reset to this value after restart
    away: # this preset will be available for all hvac modes
    temperature: 13
    target_temp_low: 12
    target_temp_high: 14
    home: # this preset will be available only for heat or cool hvac mode
    temperature: 21
    comfort:
    temperature: 18
    precision: 0.1
    target_temp_step: 0.5
  • platform: dual_smart_thermostat
    name: Office
    heater: switch.office_heater
    cooler: switch.office_cooler
    target_sensor: sensor.office_temperature
    min_temp: 6
    max_temp: 30
    ac_mode: false
    target_temp: 17
    target_temp_high: 26
    target_temp_low: 23
    cold_tolerance: 0.3
    hot_tolerance: 0
    min_cycle_duration:
    seconds: 5
    keep_alive:
    minutes: 3
    initial_hvac_mode: "heat_cool" # hvac mode will reset to this value after restart
    away: # this preset will be available for all hvac modes
    temperature: 13
    target_temp_low: 12
    target_temp_high: 14
    home: # this preset will be available only for heat or cool hvac mode
    temperature: 21
    comfort:
    temperature: 18
    precision: 0.1
    target_temp_step: 0.5
  • platform: dual_smart_thermostat
    name: Studio
    heater: switch.studio_heater
    cooler: switch.studio_cooler
    target_sensor: sensor.studio_temperature
    min_temp: 6
    max_temp: 30
    ac_mode: false
    target_temp: 17
    target_temp_high: 26
    target_temp_low: 23
    cold_tolerance: 0.3
    hot_tolerance: 0
    min_cycle_duration:
    seconds: 5
    keep_alive:
    minutes: 3
    initial_hvac_mode: "heat_cool" # hvac mode will reset to this value after restart
    away: # this preset will be available for all hvac modes
    temperature: 13
    target_temp_low: 12
    target_temp_high: 14
    home: # this preset will be available only for heat or cool hvac mode
    temperature: 21
    comfort:
    temperature: 18
    precision: 0.1
    target_temp_step: 0.5
  • platform: dual_smart_thermostat
    name: Lounge
    heater: switch.lounge_heater
    cooler: switch.lounge_cooler
    target_sensor: sensor.lounge_temperature
    min_temp: 6
    max_temp: 30
    ac_mode: false
    target_temp: 17
    target_temp_high: 26
    target_temp_low: 23
    cold_tolerance: 0.3
    hot_tolerance: 0
    min_cycle_duration:
    seconds: 5
    keep_alive:
    minutes: 3
    initial_hvac_mode: "heat_cool" # hvac mode will reset to this value after restart
    away: # this preset will be available for all hvac modes
    temperature: 13
    target_temp_low: 12
    target_temp_high: 14
    home: # this preset will be available only for heat or cool hvac mode
    temperature: 21
    comfort:
    temperature: 18
    precision: 0.1
    target_temp_step: 0.5

At the current time, I am seeing a temp from a device which is not running, while others that are running are not showing!

image

AC not being turned off after successfully being turned on

Hello,
Im controlling my Midea AC through an USB dongle with ESPHome, when I set the thermostat to cool it was able to turn on the AC.

Living room AC changed to Heat/Cool triggered by service Home Assistant Core Integration: Generic turn on

Unfortunately it doesn't seems to be able to switch it off after I set the target temp lower the current temp or change the thermostat mode to off. Is this a bug or AC's are not being supported?

Preset not displayed on panel, disappears from popup when mode is selected

So I can't get the presets to work.
This is how my config looks:
- platform: dual_smart_thermostat initial_hvac_mode: "off" name: Kitchen heater: switch.hvac_w_heat cooler: switch.hvac_y_cool target_sensor: sensor.kitchen_temperature min_temp: 60 max_temp: 80 target_temp: 70 cold_tolerance: 1 hot_tolerance: 0 min_cycle_duration: seconds: 5 keep_alive: minutes: 10 away_temp: 65 eco_temp: 67 comfort_temp: 70 anti_freeze_temp: 60 precision: 1
When restarting HA, the card looks like that (no presets):
image

When opening the popup, the presets show up, but don't work:
image

As soon as I select heating, presets dissappear:
image

Error setting up dual_smart_thermostat at boot

Hi!

The integration is working perfectly, but at boot I have this error logged by home assistant:

2022-04-07 10:40:35 ERROR (MainThread) [homeassistant.components.climate] Error while setting up dual_smart_thermostat platform for climate
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 257, in _async_setup_platform
    await asyncio.gather(*pending)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 382, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 614, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 798, in add_to_platform_finish
    await self.async_added_to_hass()
  File "/config/custom_components/dual_smart_thermostat/climate.py", line 272, in async_added_to_hass
    async_track_state_change_event(
  File "/usr/src/homeassistant/homeassistant/helpers/event.py", line 251, in async_track_state_change_event
    if not (entity_ids := _async_string_to_lower_list(entity_ids)):
  File "/usr/src/homeassistant/homeassistant/helpers/event.py", line 524, in _async_string_to_lower_list
    return [mstr.lower() for mstr in instr]
  File "/usr/src/homeassistant/homeassistant/helpers/event.py", line 524, in <listcomp>
    return [mstr.lower() for mstr in instr]
AttributeError: 'NoneType' object has no attribute 'lower'

Could it be due to the fact that some entities are not yet available (e.g. heater, target_sensor or openings)? Is thre any workaround?

Thanks!

Dual termostat heat and cool with only one switch

Hello,m i have aeroterm machine, with radian floor, I have a solenoid valve and a thermometer in each room. I config a dual termostac for each room, but only can change from off to heat mode, because y only have one switch for heat and cold, is the same switch.

Is it possible to configure hot and cold mode with a single switch?

or i hve to config one termostac to cool mode and another to heat mode.

thanks

Feature Request: 2 stage heating

Hi, I have been looking for this for a while :) Would it be possible to add a second heater switch for a second stage with a different tolerance?

Thanks,
Eric

Feature request: fan mode

It is possible to add fan hvac mode? It will be nice to have if someone have air condition with fan option.

Using AirConditioner as both heat and cold unit

I apologize for creating an issue. The discussion is not enabled for this GitHub project.

As the default air conditioner Auto HVAC mode is unable to read from external temperature sensors, I am in need of this great plugin. But I cannot figure out how I can use climate.ac_unit for both cooling if higher and heating if lower temperature than stated in the config, with setting the AC temperature. I would appreciate a config example for such usage.
Also, it would be great if this repository has an examples folder with the examples of config YAML files for different setups.
Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.