Beta for Hysen thermostats powered by broadlink


interesting I will upgrade tomorrow and test out new layout


All, I have updated the code to a version 1.0.0 from beta. available here

It now follows the format for custom components for HA 0.88 onwards, please update and provide any feedback.


@Raasu2, I’ve added a config item


if this is set to 1 always use the internal sensor to report current temp, if 1 always use external sensor to report current temp.

Hope this helps out in what you wanted


@iosdal, I will have to think about this one, it would mean making the thermostat logic in the code rather than the device itself. I may do this as I must admit I would like to tighten the hysteresis on this device, but sorry it won’t be done soon, another idea is I could simple expose an on/off service from the device (ie. ON sets the target temp above current, and OFF below) then you could use generic thermostat to control it.


Forgive me if what I write is not understood correctly, I am Spanish and I do not know English, with what I use google translator

First of all thank the great work you are doing to the creators and the people who leave their comments.
When executing the following code I get an error:


  • platform: template
    friendly_name: Anti Freeze
    value_template: “{{ is_state_attr(‘climate.house_thermostat’, ‘anti_freeze_function’, 1) }}”
    service: climate.hysen_set_advanced
    entity_id: climate.house_thermostat
    anti_freeze_function: 1
    service: climate.hysen_set_advanced
    entity_id : climate.house_thermostat
    anti_freeze_function: 0

name: ‘Calefacción’
view: yes
#icon: mdi:radiator
control: hidden
- group.calefaccion_group

name: ‘Calefacción’
control: hidden
- sensor.house_thermostat_anti_freeze_function

and if I execute it as a service too:

The service dev tool allows you to call any available service in Home Assistant.


Service Data (JSON, optional)

Do you know where I make the mistake? thanks in advance


what is the errror?


I already found the error were some quotes that were in another coding table.
The code was correct and changing them worked.
Thanks for everything.


Hi, as a heads-up: I implemented support for configuring multiple sensors. It’s currently in a PR, to be reviewed by Mark, but if/when it gets merged, it’ll require changes to existing configurations due to config file syntax changes:


I have reviewed @mairas changes and accepted then :), the version have been bumped to 1.0.3. As this is now a fairly stable release I am going to delete my fork of this in Github, so all further updates will be from the main /mairas/hysen version. Note as @mairas stated to use this version going forward you will need to change your config file to allow for the new device format: for example mine is now:

  - platform: hysen
    scan_interval: 15
        name: House Thermostat
        mac: '34:1A:34:48:B5:B7'
        target_temp_default: 20
        target_temp_step: 0.5
        sync_clock_time_per_day: True
#     another_thermostat:
#        name: another Thermostat
#        mac: 'YY:YY:YY:YY:YY:YY'


@mark.carter thanks I think a simple on off exposed would be ok.
Today I updated HA from 0.87 to the latest, but no way to load the custom component.
I have changed the directory and file name according, but nothing:

home-assistant   | 2019-03-06 16:13:33 ERROR (MainThread) [homeassistant.loader] Error loading custom_components.hysen.climate. Make sure all dependencies are installed
home-assistant   | Traceback (most recent call last):
home-assistant   |   File "/usr/local/lib/python3.7/site-packages/homeassistant/", line 166, in _load_file
home-assistant   |     module = importlib.import_module(path)
home-assistant   |   File "/usr/local/lib/python3.7/importlib/", line 127, in import_module
home-assistant   |     return _bootstrap._gcd_import(name[level:], package, level)
home-assistant   |   File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
home-assistant   |   File "<frozen importlib._bootstrap>", line 983, in _find_and_load
home-assistant   |   File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
home-assistant   |   File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
home-assistant   |   File "<frozen importlib._bootstrap_external>", line 728, in exec_module
home-assistant   |   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
home-assistant   |   File "/config/custom_components/hysen/", line 35, in <module>
home-assistant   |     from homeassistant.components.climate import (ClimateDevice, DOMAIN,ENTITY_ID_FORMAT, PLATFORM_SCHEMA, SUPPORT_TARGET_TEMPERATURE,
home-assistant   | ImportError: cannot import name 'SUPPORT_TARGET_TEMPERATURE' from 'homeassistant.components.climate' (/usr/local/lib/python3.7/site-packages/homeassistant/components/climate/
home-assistant   | 2019-03-06 16:13:33 ERROR (MainThread) [homeassistant.loader] Unable to find platform hysen.

What I am doing wrong?


Hello all,

I would like to express all my gratitude to those spend some times developping those modules for hysen thermostat.

For my application, I’m using a special kind of air damper with multiple opening angles. For best operations, I would like to know how to fetch the variable that says the thermostat is “auto” mode and the other variable saying that the thermostat is “off”.
Thank you for your help on this.



After the upgrade to hassbian 0.89 I am receiving exactly the same error as iosdal. Seems to be a new bug…

Edit: A configuration check now failes with a “Platform not found: climate.hysen”. It likely has something to do with the latest “breaking change”:


Not exactly a bug:
we can read:

Custom Components file structure change…
bla bla…
To avoid this, we’re going to no longer allow custom components to be partial overlays (just a platform). Instead, if you want to override a built-in platform, you will need to override the whole component.

So the problem could be not only the directory structure but the coding of the components.


all I’m on 88.2 and all is working for me, I will upgrade to .89 tommorow and see what happens


like these should get you what you want


you are looking for it =auto


you are looking for it=1


All, yep upgrade to 0.89 broke the component, so I’ve fixed it for now, think I may have to do more in future releases as the “Great Migration” continues. grab the new version 1.0.6 from and let me know how you go on.


Thank you Mark, this forum is so reactive, such a pleasure.


@nek1970, PM me your config.yaml to take a look.
Difficult for me to test multiple thermostats as I only have one at present


Mark, do you think your script can work well with a wifi air conditioner? I have a model Innova 2.0 wifi included. It is based on esp01. I tried to configure it but it does not work. Do you think you can make some changes to your script?


I confirm it goes well with 0.89.1.
Thanks mark for your work.
Do you think one day this module could be integrated as official HA component?