Multiple switch platforms

I’m trying to configure both rpio_gpio and command_switch switches. I can get the configuration to work ok for either, but not for both at the same time. Only the last platform (in configuration.yaml) appears on my States page. For example with this config I can see the power off switch but not the gpio solar switch:

[code]# Switches
switch:
platform: rpi_gpio
ports:
2: Solar
invert_logic: false

platform: command_switch
switches:
# System shutdown
POWER OFF PI:
offcmd: “/usr/sbin/poweroff”
[/code]

I’m sure I’m missing something dumb here…

Apologies for the dumb question - looks like a yaml formatting issue. Here is a working version:

[code]switch:

  • platform: rpi_gpio
    ports:
    2: Solar
    invert_logic: false
  • platform: command_switch
    switches:

    System shutdown

    POWER OFF PI:
    offcmd: “/usr/sbin/poweroff”
    [/code]