Broadlink IR Media Player (For old, dump TVs)


You can connect a cheap NodeMCU or something with any firmware to the USB Port.
If the TV powers on, the NodeMCU get’s an IP adress and the component can detect the state with the ‘ping_host’ variable.


Great custom component, no issue at all setting it up. However, I was hoping the extra functionality would be picked up by my voice assistants (Alexa, Google, Siri) which all tie into HA. Seems like I can only control this component, and any media component from HA, by turning it on or off.

Does anyone know if it is possible to have a media player component provide all the functionality (volume, source, mute, channel, etc.) into these voice assistants without having to create a custom skill in Alexa, custom Google Actions app, and homebridge plugin for Siri? This was the whole point of using HA for me, as a central configuration for these voice assistants.


Can we customize the displayed items in HA from the general section. I’m trying to make a media component for my sounder and obviously do not need some items (Channel + or -) to show up…


I’d also like to know. So far it’s only on or off for me as well.


can someone please answer this? I would like to implement it but not sure on the correct syntax. In particular, for me an easy way to determine if my amplifier is on is to use the state of one of my chromecast audio’s since I have automations set to turn the amp on and off based on the chromcast.


also, can someone please help me get the volume up/down for this media player component to work with a Xiaomi Cube? I have been trying a bunch of different options such as this below but nothing seems to work for me.

alias: Cube - Rotate
initial_state: 'on'
  - platform: event
    event_type: cube_action
      entity_id: binary_sensor.cube_158d00010fd152
      action_type: rotate
  - service: media_player.volume_set
      entity_id: media_player.lounge_amp
      volume_level: >
        {%if | float > 0 %} 
            service: switch.turn_on
              entity_id: switch.amp_volume
        {% else %} 
            service: switch.turn_off
              entity_id: switch.amp_volume
        {% endif %}


The media player doesn’t work in 0.64.0

ERROR:homeassistant.config:Invalid config for [media_player.broadlink]: string value is None for dictionary value @ data['power_consumption_entity']. Got None. (See ?, line ?). Please check the docs at


Did version 0.64 release?



EDIT: But i’m back on 0.63.3 :thinking:


Works in 0.64.0 when i use a dummy power_consumption_entity and enter its own entity_id.

power_consumption_entity: media_player.lg_tv

EDIT: Ahh! Sorry, didn’t see your fix on github.
Thanks for the quick fix!


I upgraded to 0.64 then tried to apply the latest build on GitHub but still had problems with the broadlink not loading, either switch, climate or media player. I’ve had to revert to 0.63.3 again to regain functionality.

Is there something I’ve missed?


Received this with 0.64

2018-02-26 15:29:12 ERROR (MainThread) [homeassistant.config] Invalid config for [media_player.broadlink]: string value is None for dictionary value @ data[‘ping_host’]. Got None
string value is None for dictionary value @ data[‘power_consumption_entity’]. Got None. (See ?, line ?). Please check the docs at


Hey @VDRainer, did you simply overwrite the 3 files to get it to work with 0.64?




Yes, using only the media_player, so replaced


@Vassilis, I believe your components require updating on your git to include broadlink==0.5.1 as per the latest hassio (0.64.1).


Hi all,
Did you guys make this work on 64.+ yet? Updated the .py files as per @VDRainer’s advice, but get this error in the log:

Traceback (most recent call last):
  File "/usr/src/app/homeassistant/helpers/", line 84, in async_setup
    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/asyncio/", line 243, in result
    raise self._exception
  File "/usr/local/lib/python3.6/concurrent/futures/", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/app/homeassistant/components/light/", line 125, in setup_platform
    'fade': group_conf[CONF_FADE]
  File "/usr/src/app/homeassistant/components/light/", line 167, in __init__
    from import DimmerGroup
ModuleNotFoundError: No module named ''
2018-03-04 20:49:47 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/asyncio/", line 182, in _step
    result = coro.throw(exc)
  File "/usr/src/app/homeassistant/", line 57, in async_setup_component
    return (yield from task)
  File "/usr/local/lib/python3.6/asyncio/", line 327, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/local/lib/python3.6/asyncio/", line 250, in _wakeup
  File "/usr/local/lib/python3.6/asyncio/", line 243, in result
    raise self._exception
  File "/usr/local/lib/python3.6/asyncio/", line 180, in _step
    result = coro.send(None)
  File "/usr/src/app/homeassistant/", line 119, in _async_setup_component
    conf_util.async_process_component_config(hass, config, domain)
  File "/usr/src/app/homeassistant/", line 624, in async_process_component_config
    platform = get_platform(domain, p_name)
  File "/usr/src/app/homeassistant/", line 104, in get_platform
    return get_component(PLATFORM_FORMAT.format(domain, platform))
  File "/usr/src/app/homeassistant/", line 142, in get_component
    module = importlib.import_module(path)
  File "/usr/local/lib/python3.6/importlib/", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 674, in exec_module
  File "<frozen importlib._bootstrap_external>", line 781, in get_code
  File "<frozen importlib._bootstrap_external>", line 741, in source_to_code
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/config/custom_components/media_player/", line 7
    <!DOCTYPE html>
SyntaxError: invalid syntax```


Hi, so I just got appdeamon installed
Anyone mind explaining how do I properly add this to my configuration.yaml?
Especially for ‘/custom_components/media_player/’ & ‘/broadlink_media_codes’ directories.

So I got the tv component working, but I can’t quite get fan working. I’m getting ‘Unable to find component fan.broadlink’ error and I’m not quite sure how to fix this.


@monkey-house did you overwrite the whole media player folder or just the

If just the it wont work. I tried that first but it doesnt overwrite the pycache file thats created (at least I think thats the problem). Delete the whole media player folder and copy the new one across. Thats worked for me anyway. Dont forget to restart home assistant again afterwards


@EGO01: got it working in the end. Noob mistake of not copying the raw code. @Vassilis was great in helping as alway. Works a treat now again!


that Thinking out side the Square :slight_smile: