I’m running 2021.10.6 on Pi4.
While calculating sunset/sunrise i think my home location is not correct.
The location on the map is ok, i’m trying to add the location in the config:
# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:
http:
ssl_certificate: /ssl/fullchain.pem
ssl_key: /ssl/privkey.pem
# configuration.yaml entry
homeassistant:
allowlist_external_dirs:
- “/config” # name
name: Home
latitude: 51.1322
longitude: 6.1260
elevation: 40
# Example configuration.yaml entry
sensor:
platform: filesize
file_paths:
When checking the configuration, i get these errors:
Integration error: elevation - Integration ‘elevation’ not found.
Integration error: name - Integration ‘name’ not found.
Integration error: longitude - Integration ‘longitude’ not found.
Integration error: latitude - Integration ‘latitude’ not found.
Difficult to tell because what you posted is unformatted but it might simply be incorrect indentation. The first few lines after homeassistant: should be indented.
I think the “lat-lon-alt” in the configuration wasn’t the real problem:
After defining an automation (lights on after sunset, with an offset), it didn’t work out the way i suspected. I removed the “lat-lon-alt” from the configurations-file and set my location on the Map again (with the same result).
The main problem is that the time displayed in the Automations-stepdetails-tab (after removing the time-offset) is not what i expected:
Executed: October 28, 2021, 09:57:18
Result:
result: true
## conditions/0
Executed: October 28, 2021, 09:57:18
Result:
wanted_time_before: '2021-10-28T16:16:08.670076+00:00' result: true
At my place Sunset is at 18:18, so i expect the “wanted_time” displayed above in GMT also because of +00:00 in the datetime-line.
This is very confusing, is this an error or is there something i can change to show the right (local) time?
BTW i purposely changed it to “before_sunset” for testing purposes.
- id: '1634648211862'
alias: Office - Light on when motion
description: ''
trigger:
- platform: state
entity_id: binary_sensor.tz1800_fcdjzz3s_ty0202_ias_zone
to: 'on'
condition:
- condition: state
entity_id: sun.sun
state: below_horizon
action:
- service: switch.turn_on
target:
entity_id: switch.tz3000_kdi2o9m6_ts011f_on_off
mode: single
For testing purposes during day time, change below_horizon to above_horizon.
You can also add a second condition to prevent sending a command to turn on the switch if it’s already on. In this example, both conditions are presented as Template Conditions in shorthand notation.
- id: '1634648211862'
alias: Office - Light on when motion
description: ''
trigger:
- platform: state
entity_id: binary_sensor.tz1800_fcdjzz3s_ty0202_ias_zone
to: 'on'
condition:
- "{{ is_state('sun.sun', 'below_horizon') }}"
- "{{ is_state('switch.tz3000_kdi2o9m6_ts011f_on_off', 'off') }}"
action:
- service: switch.turn_on
target:
entity_id: switch.tz3000_kdi2o9m6_ts011f_on_off
mode: single