Lovelace: How to add input_number and toggle switch (dimmer and toggle) on same line?

Hi,

I have worked (googled) for hours and hours to get my old switches and dimmers in HA. They work great, i can use them in Homeassistant. So far, so good. What I can’t seem to do is, add them to the Lovelace dashboard on the same line, shown as a input_number (slider) and toggle/switch.

What I would like to achieve is this:

stekker_8

My working code:

input_number:
  dimmer1:
    name: Stekker 8
    initial: 0
    min: 0
    max: 255
    step: 1

shell_command:
  dimmer1: "curl -k http://IP/PW/sw/dim/7/{{ '%03d'|format(states('input_number.dimmer1')|int) }}"
  dimmer1_off: "curl -k http://IP/PW/sw/dim/7/off"

light:
  - platform: template
    lights:
      dimmer1:
        friendly_name: "stekker 8"
        value_template: "{{ states('input_number.dimmer1') | int >= 1 }}"
        level_template: "{{ states('input_number.dimmer1') | int }}"
        turn_on:
          - service: input_number.set_value
            data:
              entity_id: input_number.dimmer1
              value: 255
          - service: shell_command.dimmer1
        turn_off:
          - service: input_number.set_value
            data:
              entity_id: input_number.dimmer1
              value: 0
          - service: shell_command.dimmer1_off
        set_level:
          - service: input_number.set_value
            data_template:
              entity_id: input_number.dimmer1
              value: "{{ brightness }}"
          - service: shell_command.dimmer1

- alias: Dimmer1
  id: '1513037592911'
  trigger:
  - entity_id: input_number.dimmer1
    platform: state
  action:
  - service: shell_command.dimmer1

Is there anyway to do this, using an input_number and a switch? Any help is appreciated. I have looked at the Thomas Loven add on, light groups, groups. But I can’t do it.

Jaap

Ask there then.