Switch setup

Hi, i am an absolute newbie to hassio. i am trying to do the simplest of tasks and that is to switch on a zwave socket from a zwave humidity sensor.
The zwave is all working but i cannot get the automation to work.
Here is a copy of my automation.

  • action:
    • alias: ‘’
      data: {}
      service: switch.turn_on
      alias: Garage_deHum
      id: ‘1502216434937’
      trigger:
    • above: ‘60.0’
      below: ‘55’
      entity_id: sensor.garageold_relative_humidity
      platform: numeric_state
      value_template: ‘{{states.sensor.garageold_relative_humidity.state}}’
      My switch is switch.garageold_dehum_switch but i cannot work out how to enter this into the automation editor.
      Thanks in advance
      Paul.

You will need to use the </> pre formatted text icon to format your code properly so we can see your spacing.

You need to set it as json data in the data field of your action
{“entity_id”: “switch.garageold_dehum_switch”}

Thanks for your help. that worked.
Do you have to write another automation to switch it off.
ie i am trying to switch a dehumidifier on above 60% and off again below 55%
Cheers
Paul.

Yes, you’ll need a second automation for that.