IHC pushbutton used in automation - Help needed

Hi,
Total noob within automation and programming here, so sorry if my problems are due to lack of basic knowledge:
I Managed to setup Home Assistant on a Raspberry Pi and get the IHC integration installed and working (auto_setup: true)
I also managed to “map” a couple of my wireless IHC “tryk” (pushbutton remotes) to HA as binary sensors:

binary_sensor:
     - id: 36444
       name: Tryk_Koekken_Bryggers_NV
     - id: 36700
       name: Tryk_Koekken_Bryggers_NH

When I press an release on of these “tryk” the HA logbook shows these being turned on (when the button is pressed) and turned off (when the button is released), so the mapping seems to work.

I have made an automation where I am trying to play/pause my SONOS mediaplayer by pressing one of the IHC “tryk”:

- id: '1546893667219'
  alias: Mediaplayer test
  trigger:
  - entity_id: binary_sensor.tryk_koekken_bryggers_nv
    from: 'Off'
    platform: state
    to: 'On'
  action:
  - service: media_player.media_play_pause
    entity_id: media_player.alrum

The automation is not working when I push the IHC “tryk”, but it is working if I trigger the automation manually in HA. This leads me to believe that it is the trigger part of the automation which is not working. What am I doing wrong?

Thanks in advance for any assistance!

Best regards
Thomas

Your from and to arguments need to be in lowercase.

Like so:

- id: '1546893667219'
  alias: Mediaplayer test
  trigger:
  - entity_id: binary_sensor.tryk_koekken_bryggers_nv
    platform: state
    from: 'off'
    to: 'on'
  action:
  - service: media_player.media_play_pause
    entity_id: media_player.alrum