platform (example config files)

Machine config examples

Here are some example machine-wide config files that show real-world examples of how these configs are used.

Note that there are multiple machine config examples here. They’re just included to show different options. You wouldn’t actually use more than one.

#config_version=5

switches:
    s_test:
        number: 1
        platform_settings:
            debounce_open: 20ms
    switch1_p_roc:  # this should not cause duplicate switch exceptions
        number: 1
        platform: p_roc
    switch1_p_fast:
        number: 1
        platform: fast

coils:
    c_test:
        default_pulse_power: 0.128
        number: 1
    c_test_no_allow_enable:
        number: 2
    c_test_allow_enable:
        number: 3
        max_hold_power: 1.0
    c_test_hold_power:
        number: 4
        default_hold_power: 0.1
    coil1_p_roc:    # this should not cause duplicate coil exceptions
        number: 1
        platform: p_roc
    coil1_fast:
        number: 1
        platform: fast

# this should not cause duplicate light exceptions
lights:
    light1_p_roc:
        number: 1
        platform: p_roc
    light1_fast:
        number: 1
        platform: fast
    light1_virtual:
        number: 1
#config_version=5

hardware:
  platform: smart_virtual, virtual

switches:
  switch1:
    number: 1
  switch2:
    number: 2
    platform: virtual