Automation syntax errors, trying to get two switches 'linked'

My new house has about 8 z-wave modules around the place, while i am eventually hoping more sensors replace the need for switches and we are heavily enjoying the voice automation via google homes i still wanted lots of switches in logical places for my children and visitors.

I had low voltage cable run between switch locations and my raspberry pi during construction and am using 12v relays triggered off these to toggle GPIO bins on the board, that is all working fine and pressing a switch will show up on home assistant as pressed. The issue i am having is how to get that event trigger to actually do anything so i was using ‘automation’ except i keep getting errors.

In this i am trying to have it that when the GPIO has a momentary on from the ‘lounge switch’ it will turn on the ‘dinning room light’ (if it makes a difference this is a dimmer, but i have tried another light which was a switch/relay and it made no difference). I understand there is ‘toggle’ but for now i just wanted to achieve this as i thought maybe toggle was causing issues.

automation:
  - alias: Soft Kitchen Switch
#    initial_state: false
    trigger:
      - platform: state
        entity.id: switch.Lounge_GPIO
        to: 'on'
    action:
      service: homeassistant.turn_on
      entity.id: light.dinning_room

There’s your problem. Have a look at the examples for what that really should be.

2 Likes

damn it, i followed examples and even had them side by side and missed the fact the . should have been an _.

Appreciate the steering…