17-03-15 21:59:42 ERROR (MainThread) [homeassistant.components.switch] Error while setting up platform broadlink
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 153, in _async_setup_platform
entity_platform.schedule_add_entities, discovery_info
File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__
yield self # This tells Task to wait for completion.
File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup
value = future.result()
File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
raise self._exception
File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
result = self.fn(*self.args, **self.kwargs)
File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/switch/broadlink.py", line 137, in setup_platform
device_config.get(CONF_COMMAND_OFF)
File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/switch/broadlink.py", line 163, in __init__
self._command_on = b64decode(command_on) if command_on else None
File "/usr/lib/python3.4/base64.py", line 90, in b64decode
return binascii.a2b_base64(s)
binascii.Error: Incorrect padding
HI
its on startup error i have broadlink RM pro ,and ther ei setup samsung tv.
i can service get code now i set in yaml and try to restart hass then i am getting this error and cant see switch on dashboard.
thanks
So there seems to be something wrong with the base64 string you give for command_on / command_off. Can you try and remove the switch and get that command again? You could also try to replace your command_on / command_off with this
Sorry for trouble i think RM Pro give me first wrong code at last i get final code
command_on: ‘JgBGAJWRFTUVNRU1FRAUEBcPFREWDxUzFTUVNRcPFhAVDxUQFBIUEBY0GA4UEBURGhIUERQRFDYXDhQ2FDQVNxQ2FDYUNhQADQUAAA==’
command_off: ‘JgBGAJWRFTUVNRU1FRAUEBcPFREWDxUzFTUVNRcPFhAVDxUQFBIUEBY0GA4UEBURGhIUERQRFDYXDhQ2FDQVNxQ2FDYUNhQADQUAAA==’
which is differnt then previous .
thanks for all who ever help me specially PhyberApex
You can use the send_command_IP service to send those commands. I recommend making a script for things that go together and using of a data template. Like one for volume control one for numpad stuff. Which take a parameter.