home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.11k stars 29.79k forks source link

Broadlink remote.send_command Failed: You need to specify a device #39785

Closed danieledwardgeorgehitchcock closed 4 years ago

danieledwardgeorgehitchcock commented 4 years ago

The problem

Using the new replacement service and integration for a Broadlink RM Pro. I can see the device has been configured correctly however, when porting across my old automation flow into the new format, the automation fails with the following error:

Failed to send 'JgBQAAABJ5USExIVERQRFBIUERQPFRMTEzYTNxI4EjkQORM3EjgROw4UExQRFg8TFBMRFg8UEhMSNxM3EjgSOBI4EjgSOBE4EgAFHgABKEsSAA0FAAAAAAAAAAA=': 'You need to specify a device'

I followed the Broadlink guidance in the Breaking Changes details summary here: Release 115

As far as I can see, the device argument should be optional, not mandatory

Environment

arch | x86_64
-- | --
dev | false
docker | true
hassio | false
installation_type | Home Assistant Container
os_name | Linux
os_version | 4.15.0-115-generic
python_version | 3.8.4
timezone | Europe/London
version | 0.115.0b0
virtualenv | false

Problem-relevant configuration.yaml

 - alias: Living Room Candles On
    trigger:
      - platform: state
        entity_id: input_boolean.living_room_candles
        to: "on"
    action:
      - service: remote.send_command
        data:
          entity_id: remote.lounge_rm_pro_remote
          command: "JgBQAAABJ5USExIVERQRFBIUERQPFRMTEzYTNxI4EjkQORM3EjgROw4UExQRFg8TFBMRFg8UEhMSNxM3EjgSOBI4EjgSOBE4EgAFHgABKEsSAA0FAAAAAAAAAAA="

Traceback/Error logs

Failed to send 'JgBQAAABJ5USExIVERQRFBIUERQPFRMTEzYTNxI4EjkQORM3EjgROw4UExQRFg8TFBMRFg8UEhMSNxM3EjgSOBI4EjgSOBE4EgAFHgABKEsSAA0FAAAAAAAAAAA=': 'You need to specify a device'

Additional information

Using latest Beta release

VDRainer commented 4 years ago

You need to prefix the code with b64

command: b64:JgDMAFQeDw....
danieledwardgeorgehitchcock commented 4 years ago

Thanks!

Now that you have mentioned it, I can see it in the documentation.

Fixed!