How can i add Broadlink temperature to ha?


I have a RmPro, how can I add the temperature to display on HA?


  - platform: broadlink
    host: IP_ADDRESS
    mac: 'MAC_ADDRESS'
      - 'temperature'

yes yes, I did it, but this still does not show on ha, I don’t know what I miss :frowning:

You have to provide more info.
Have you tried hass --script check_config ?
Enable debug logging and check the log.
And read this

work now! change the code from switch.yaml to configuration.yaml

you are the men as always! Thanks!

Hmm… I thought my problems with the temp failing were over since the last HA update but it appears not, I get the error below and restarting HA is needed to get it working again for a while. Time it happens doesn’t coincide with anything else HA or the RM Pro is doing and I have the update interval set to 600 as someone else said the default caused theirs to fail. Any ideas appreciated?

2017-10-04 05:06:39 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.broadlink_sensor_temperature fails
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/homeassistant/helpers/", line 225, in async_update_ha_state
    yield from self.hass.async_add_job(self.update)
  File "/usr/lib/python3.6/asyncio/", line 331, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.6/asyncio/", line 244, in _wakeup
  File "/usr/lib/python3.6/asyncio/", line 244, in result
    raise self._exception
  File "/usr/lib/python3.6/concurrent/futures/", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/sensor/", line 96, in update
  File "/usr/lib/python3.6/site-packages/homeassistant/util/", line 306, in wrapper
    result = method(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/sensor/", line 134, in _update
    if retry > 0 and self._auth():
  File "/usr/lib/python3.6/site-packages/homeassistant/components/sensor/", line 139, in _auth
    auth = self._device.auth()
  File "/usr/lib/python3.6/site-packages/broadlink/", line 205, in auth
    payload = self.decrypt(response[0x38:])
  File "/usr/lib/python3.6/site-packages/broadlink/", line 174, in decrypt_pycrypto
    return aes.decrypt(bytes(payload))
  File "/usr/lib/python3.6/site-packages/Crypto/Cipher/", line 209, in decrypt
    raise ValueError("Error %d while decrypting in CBC mode" % result)
ValueError: Error 3 while decrypting in CBC mode

It seems that you get some invalid data from your sensor.

Any idea what, or more importantly, what I can do about it? Or perhaps some way to tell it not to worry and have another go rather than just stop for good?

After I add the temp, all my broadlink device does not show any more.

do you have any idea what can i check?


i have a file switch.yaml
also on configuration.yaml i have what need to be add

i dont know what is worng the log is ok

Have you tried hass --script check_config ?

Why do you have broadlink _IR ? It should be only broadlink

Here is my setup: (The sensor is currently disabled)

1 Like

copy your code :slight_smile: so I need to add the broadlink to the main script and also to the switch.yaml
good to know, this info is missing on the webpage.

  • platform: broadlink

No, you have them wherever you have the relevant components. This can either be directly in the config yaml OR if you have split up your config like Daniel has, and most do after a short while, you have a link in the config to load the relevant file and then the setting in the secondary file.

In this case the temp bit goes under sensors and the switches controlled by your RM Pro goes under switches.

may you know why alexa get the device as offline and some time online?