pnbruckner/ha-sun2

Sun2 configuration file is not loaded

Closed this issue · 4 comments

Hi Phil,

sorry for that, but I am totally lost with the new sun2. I have setup a new HA only for testing sun2. I installed the integration and it configures sun2 entities automatically without using my local configuration.

Here is my config:
in configuarion.yaml:
packages: !include_dir_named integrations

in the folder integrations, I have the file sun2.yaml with the content from you example:

sun2:
  - unique_id: xxx
    binary_sensors:
      - unique_id: bs1
        elevation: horizon
      - unique_id: bs2
        elevation: 3
      - unique_id: bs3
        elevation: -6
        name: Above Civil Dawn
    sensors:
      - unique_id: s1
        time_at_elevation: 10
      - unique_id: s2
        time_at_elevation: -10
        direction: setting
        icon: mdi:weather-sunset-down
        name: Setting past 10 deg below horizon
      - unique_id: s3
        elevation_at_time: '12:00'
        name: Elv @ noon
      - unique_id: s4
        elevation_at_time: input_datetime.test
        name: Elv @ test var

But all the entities will not be created. What is wrong here?

Spartacus.

I think your issue may have to do more with your package configuration than with your sun2 configuration. Have you first tried adding the sun2 configuration directly to configuration.yaml? If that works, then it is indeed a configuration packaging issue, and you should ask for help on the forum or in discord. I have used packaging, but not that option, so I can't really help directly.

Also, if it's not loading, I would think there should be errors. Are there any related errors in the log?

Hi Phil,

it is loading now, but it took some time until I noticed, how the names are build :-)

If you configure the location in sun2, it will assemble the names accordingly.
The name of the sensor is derived from the "Friedly name", if specified. I think I have it now.

I hope I can change the sensor names by "search & replace" with Visual Studio Code...but I think this will not work in the Lovelance Cards...I'm going to take advantage of a quiet moment to do this hard work... maybe in the holy evening!

Thanks a lot,
Spartacus

I'm glad you got it working. If this type of thing ever happens in the future, you can use the Entities page, sorted by integration, to see if the entities were created and easily see their names, entity IDs, etc.