Beta for Hysen thermostats powered by broadlink

You are right with the component name there is a standard one which is not working as well.

It looks like the the BYC17.GH3 WIFI not work working with both solutions.
Of course I tried already the “standard” way with real MAC addres

  • platform: broadlinkHysen
    name: Main Thermostat
    mac: ‘B4:E6:2D:47:C3:7D’
    target_temp_default: 20
    target_temp_step: 0.5
    scan_interval: 15

or the other ways without a colon and small letters

  • platform: broadlinkHysen
    name: Main Thermostat2
    mac: ‘b4e62d47c37d’
    target_temp_default: 20
    target_temp_step: 0.5
    scan_interval: 15

all of them end up with:

018-10-02 09:48:27 WARNING (MainThread) [homeassistant.loader] You are using a custom component for climate.broadlinkHysen which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.
2018-10-02 09:48:29 ERROR (MainThread) [homeassistant.components.climate] Error while setting up platform broadlinkHysen
Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/homeassistant/helpers/”, line 128, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File “/usr/local/lib/python3.6/asyncio/”, line 358, in wait_for
return fut.result()
File “/usr/local/lib/python3.6/concurrent/futures/”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/config/custom_components/climate/”, line 61, in setup_platform
mac_addr = binascii.unhexlify(config.get(CONF_MAC).encode().replace(b’:’, b’’))
binascii.Error: Non-hexadecimal digit found

so I guess this model is not working so have to send it back in order to get a different one.

Anyone tried that one: Link to

But why the MAC adress can not be converted that is strange:

binascii. unhexlify ( hexstr )

Return the binary data represented by the hexadecimal string hexstr . This function is the inverse of b2a_hex() . hexstr must contain an even number of hexadecimal digits (which can be upper or lower case), otherwise an Error exception is raised.

I got it working with this one here

Ive got this working perfect using these ones from
Floureon WIFI Thermostats.

This is the entry I use in my config.
platform: broadlinkHysen
name: Main Thermostat
mac: ‘34ea349fc295’
target_temp_default: 20
target_temp_step: 0.5
scan_interval: 15

I did some posts earlier in this thread, showing more of my setup. (and problems)
see: Beta for Hysen thermostats powered by broadlink

I can strongly recommend these Floureon Thermostats, they look good, give a good feel of quality and has a very good screen and touch functionality.
I got 12 of them working in my setup, they been running for mouth without any hiccups or problems.

Good luck to everyone,


I finally recieved some Beok BT-313 thermostats. They are configures in the app, but I am unable to get them working in HA. PS! I am running HA in docker, not HASSio.

Would someone please have a look at the log and config below to and let me know if you have any suggestions for me to try? Many thanks in advance :slight_smile:

Excerpt from config file:
- platform: broadlinkHysen
name: Bathroom thermostat
mac: 34:EA:34:9F:C7:C5
target_temp_default: 20
target_temp_step: 0.5
scan_interval: 15

Excerpt from the HA log:
File “/usr/local/lib/python3.6/concurrent/futures/”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/config/custom_components/climate/”, line 74, in setup_platform
BroadlinkHysenClimate(hass, name, broadlink_device, target_temp_default, target_temp_step, operation_list)
File “/config/custom_components/climate/”, line 120, in init
File “/config/custom_components/climate/”, line 356, in update
self.HysenData = self._broadlink_device.get_full_status()
File “/usr/local/lib/python3.6/site-packages/broadlink/”, line 648, in get_full_status
payload = self.send_request(bytearray([0x01,0x03,0x00,0x00,0x00,0x16]))
File “/usr/local/lib/python3.6/site-packages/broadlink/”, line 628, in send_request
raise ValueError(‘hysen_response_error’,‘first byte of response is not length’)
ValueError: (‘hysen_response_error’, ‘first byte of response is not length’)

I notice there is no folder in my container host named:

Might this be an issue related to missing file/folder for

@Svellem, only thing I can see put your mac, in quotes mac: ‘34:EA:34:9F:C7:C5’

Thanks, I will try later :slight_smile:

work with Beok TDS23 WI-FI-WP

But i dont understand why it show me 5 °C when it is off
Off 5 °C
Now: 22.5 °C

and i dont see this sensors

  • sensor.thermostat_heating_state
  • sensor.thermostat_auto_override

is it from attributes of climate.thermostat ?

my climate.thermostat has such attributes

current_temperature: 22.5
min_temp: 5
max_temp: 35
temperature: 26
target_temp_step: 0
operation_mode: auto
operation_list: heat,auto
remote_lock: 0
power_state: 1
heating_active: 1
auto_override: 1
sensor_mode: 0
external_sensor_temprange: 0
deadzone_sensor_temprange: 1
loop_mode: 0
roomtemp_offset: 0
anti_freeze_function: 0
poweron_mem: 0
external_temp: 0
clock_hour: 4
clock_min: 49
clock_sec: 53
day_of_week: 2
week_day: [object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
week_end: [object Object],[object Object]
friendly_name: thermostat
supported_features: 4225

Hi! I took Mark’s code and began working on the module to add some new features and to hopefully get it in a shape that a PR could be made to get it to home-assistant. So far I’ve just done a bit of cleanups and added support for external temperature sensors.

The repo is here:

At the moment I’m debugging why the module barfs if there are multiple sensors configured. Other improvements I’d like to make are supporting automatic device discovery (although I’m not sure how feasible that is) and device configuration using services.

@mark.carter, would you mind verifying that your code is licensed under Apache License 2.0 (the same license Home Assistant itself uses)?

@mairas, yep feel free to do what you want with the code I put together, I had intended to get it into Home Assistant but other things have got in the way :slight_smile:)

On the auto discovery, if you look in the base broadlink there is a method to do autodiscovery (, however I found it to be a little bit hit and miss, so opted for the declared version.

Yes, I found the discovery method and that’s what I thought of using. However, HA’s standard discovery uses an external netdisco module and is based on UPnP and mDNS. I’m not yet sure how to incorporate custom discovery methods there.

I guess the best of both worlds would be that you find the devices with autodiscovery and then save them. Then the previously discovered thermostats could work as reliably as the statically declared ones.

In case anyone is using the device with an external temperature sensor: have you noticed that the device would randomly revert back to the internal sensor? That has happened to me a couple of times and I don’t really see how the component code (either Mark’s or my own) could do that.

It’s really annoying because my bathroom thermostat is not even in the bathroom, so the floor had heated up to a balmy 31°C for a couple of days.

Bummer. If I tweak the temperature back and forth via HA, the device eventually reverts back to the internal sensor. Apparently the low level message format is not quite right. :frowning:

Great component. Is there a way to add the internal and external temp sensor readings as HA sensors? I want to view them on a graph in Grafana.

Rassu2 on these type you can you the two sensors one as temp and one as limiting temp, to display as a sensor something like this should work

  • platform: template
    icon_template: mdi:fire
    friendly_name: “External Senor Temp”
    value_template: “{{house_thermostat_MainSenorTemp.attributes.external_temp}}”
    unit_of_measurement: “°C”

@mairas, I’ve started using the external sensor, but only fully not as a limiting sensor and have not seen it switch back, I will try take a look

@mairas, sorry only just seen you have started a github for this, I’ve made a couple of changes I will see if I ca n work on that

This didn’t work unfortunately.

Doesn’t the thermostat send the temp measurement with MQTT?

@Raasu2, nope it does not send over MQTT

sorry my example was rubbish, try this this is what I use for some of the states and I’ve added external temp.
I’m just testing it !!!

- platform: template
icon_template: mdi:fire
friendly_name: “Heating Demand”
value_template: “{% if states.climate.house_thermostat.attributes.heating_active == 1 %}On{% else %}Off{% endif %}”
icon_template: mdi:flash-outline
friendly_name: “Auto Override”
value_template: “{% if states.climate.house_thermostat.attributes.auto_override == 1 %}On{% else %}Off{% endif %}”
icon_template: mdi:fire
friendly_name: “External Sensor Temp”
value_template: “{{states.climate.house_thermostat.attributes.external_temp}}”
unit_of_measurement: “°C”

Working on mine :slight_smile:

Hi Mark,

Thanks, made you a collaborator in the repo.

Re the thermostat switching back to internal sensor - the issue is a bit difficult to debug because it doesn’t happen consistently. I do get the following error often on HA startup, and I think it might be related to that:

  File "/home/homeassistant/.homeassistant/custom_components/climate/", line 410, in update
    self.HysenData = self._broadlink_device.get_full_status()
  File "/srv/homeassistant/venv/lib/python3.5/site-packages/broadlink/", line 648, in get_full_status
    payload = self.send_request(bytearray([0x01,0x03,0x00,0x00,0x00,0x16]))
  File "/srv/homeassistant/venv/lib/python3.5/site-packages/broadlink/", line 612, in send_request
    request_payload.append(crc & 0xFF)
TypeError: unsupported operand type(s) for &: 'NoneType' and 'int'