Dimmer Light Setup

Hi All,

I’m trying to setup a dimmer light with the light platform but have little experience with HA. My dimmer (KaKu) responds to and url instruction, so I’m using the command line curl within the light setup.

light:
  - platform: command_line
    lights:
      hw_dim_proef:
        command_on: "curl http://IP/PW/sw/dim/34/100"
        command_off: "curl http://IP/PW/sw/dim/34/0"
        command_state: "curl http://IP/PW/get-status"
        value_template: '{{ value_json.response.switches[34].status == "on" }}'
        friendly_name: DimProef

But it seems impossible to use command_line within light. Also, ‘brightness’ has to be added somewhere…
Any ideas to approach this.
Thx,
Ppee

You may need to use a Template Light, and then create Shell Command’s to call for the actions, and Command Line Sensor’s to get the state and brightness to reference from the Template Light’s corresponding templates.

Thx for your reply pnbruckner, I’m going to figure that out. Do you know a site where I can find some more extensive information about templating and the possibilities of shell commands. The information on this site seems rather limited. Thx again
PPee

The only place I know of is the HA website itself that contains all the documentation. The links I provided are from that site.

Hi, has anyone found a solution?