I'm old but trying to learn

I have code that works at my house. The front porch light comes on after sunset, if the front door opens.

- id: '1708744525201'
  alias: New Front Porch Light on Door opening After sunset 2-23-24
  description: ''
  trigger:
  - platform: state
    entity_id:
    - binary_sensor.lumi_lumi_sensor_magnet_aq2_87da0008_on_off  # This is my front door sensor
    from: 'off'
    to: 'on'
  condition:
  - condition: state
    entity_id: sun.sun
    state: below_horizon
  action:
  - service: switch.turn_on
    metadata: {}
    data: {}
    target:
      device_id: e0f4c7d64634bd117c387dd8fcba3ad8  # this is my front porch light
  mode: single

The -id, the binary_sensors, and devices are different than yours, but this code works great, no turn-off code yet.

1 Like

Hey Marc how are you getting on? Have you explored the youtube guides at all on Home Assistant?

No, didn’t know about it but Headed that way now, thank you!!!

feel free to hit me up on chat if you’re really struggling and want some real time help. if i’m online and available i’m happy to do so. what you’re trying to do here should be really easy.

3 Likes

@Marc1955 hit me up also if you get stuck anywhere, you are NEVER too old to learn, 70s you are still young nowadays!

2 Likes

Highly recommend Lewis’s everydaysmarthome channel, it’s essentially all home assistant content, he’s a nice bloke too but as others have said we’re all here to help. The best person is the person willing to learn so your approach is fantastic.

1 Like

If using tutorials that aren’t part of the official documentation, just be aware that HA evolves over time and tutorials that were once good can become out-of-date. Check how recent they are, and if you encounter problems, cross-check with the docs.

3 Likes

How you coming along, Marc?

I’m slowly learning, still have my problems. I absolutely hate matter devices, daily spent reconnecting them, moving to zigbee.

Thank you for asking