Today I have for my lat/lon
Your sun.sun - 26.36
suncalc.org - 26.18
Thanks. But itās not the values themselves so much as if max_elevation changes only at midnight and agrees with the actual max value of elevation throughout that day, especially at the time indicated by next_noon. (Note I mean the value of next_noon before that time, because like the other next_xxx attributes, they change at the time they indicate.)
The fact that this doesnāt match a value provided by another source isnāt surprising. HAās sun component (which, of course, my custom version is based on), uses astral from PyPI.
Yes, I most certainly wasnāt ācomplainingā in any way that the values donāt match.
I hadnāt realised this was useful information for you thoughā¦
Iāll try to have a look in the next few days but it wonāt be tomorrow as I wonāt be around at noon.
Custom Updater only shows version 1.0 - did you update the version json yet?
Yes, I did. You probably need to run the custom_updater.check_all service manually to see it, because I think that only runs automatically at startup, then once a day after that.
Yeah I think the card takes up yo an hour to show it and I realise now 2 minutes is not an hour lol/ I only just got a bunch of updates so Iām sure sun will show soon.
He also made a change in the way it works I think. Something about some process that updates his own json file once an hour from individual json files rather than having the component use the individual json files directly as it used to. Honestly, Iām not sure I like the change, and I havenāt updated custom_updater myself in quite a while. In fact, Iām thinking of removing it from my system because the only custom components Iām using are my own and the only reason I installed custom_updater in the first place was to make sure it worked with my custom components.
Just got it now. New updater works greatā¦
Hi, I am trying to set up the enhanced sun component on 0.88 but get the following error. Is this something I am doing wrong? sun.py is in config/custom_components/sun.py
Cheers,
James
Log Details (ERROR)
Sat Feb 23 2019 09:06:43 GMT+0000 (Greenwich Mean Time)
Error loading custom_components.sun.automation. Make sure all dependencies are installed
Traceback (most recent call last): File ā/usr/src/app/homeassistant/loader.pyā, line 147, in _load_file module = importlib.import_module(path) File ā/usr/local/lib/python3.7/importlib/init.pyā, line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File ā<frozen importlib._bootstrap>ā, line 1006, in _gcd_import File ā<frozen importlib._bootstrap>ā, line 983, in _find_and_load File ā<frozen importlib._bootstrap>ā, line 962, in _find_and_load_unlocked ModuleNotFoundError: No module named ācustom_components.sun.automationā; ācustom_components.sunā is not a package
Yes even after a restart. I was not getting all the monitored attributes either just the standard sun component ones. Actually, I just saw the linked thread and tried someoneās suggestion to create init.py & after a restart the monitored attributes finally showed up, but the error still exists.
Interesting. I did not experience that on the 0.89 dev branch. But apparently I didnāt test enough. The automation was getting turned off. When I tried to turn it back on I saw the errors again.
You could try the following if youād like. (I tried this on my dev checkout and it seems to work. Of course, I thought it was working before, too.) You may have to adjust depending on how you installed HA. If you do, let me know how it goes. BTW, this assumes my sun.py is now located in custom_components/sun/__init__.py
.
cd custom_components
sudo -u homeassistant ln -s /srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/automation/sun.py sun/automation.py
Hi, this has been very useful for me. However i am now after the time minus next sunrise and sunset. i.e. how many hours:minutes are remaining till next one. has anyone tried that please?
Sorry, itās not quite clear what youāre asking. Can you try asking a different way maybe?
Hello how did you get those āsunriseā and āsunsetā values?
Iāve installed the custom sun component on this page and it does not appear for me:
If there is a way of getting todays sunrise and sunset, not the next one, that would be what Iām after.
There are setup options you need to configureā¦ did you follow the instructions?
Thanks, that was it. My config was still using the old sun settings, after a Git Pull and a reboot itās all working as intended.
Thanks pnbruckner for this enhancement, really handy to be able to use todays sunrise and sunset for solar stats
I am curious on what you came up with the WU API since I have had mine for years now. What type of sensors did you come up with?