Hi,
I have a strange question. I would like to control a light in another timezone/location, therefore, I was wondering if it is possible to set the longitude & latitude within an automation rather than at the HA global configuration.yaml level.
I have included some semi-pseudo code below to illustrate how I think it could work.
- alias: Turn on light
initial_state: true
trigger:
- entity_id: person.my_name
from: not_home
platform: state
to: home
condition:
- condition: state
entity_id: sun.sun
state: below_horizon **( latitude: -31.452280, longitude: 134.654700 )**
action:
- data: {}
entity_id: switch.outside_light
service: switch.turn_on
- entity_id: switch.garage_light
service: switch.turn_on
- entity_id: light.hue_white_lamp_1_2
service: light.turn_off
- delay: 00:05:00
- entity_id: switch.outside_light
service: switch.turn_off
- entity_id: switch.garage_light
service: switch.turn_off