Have you followed the updated installation instructions?
If so and you’re still having problems, what version of HA are you on? Did you use custom_updater to install the “element” named “sun”, and what version of custom_updater do you have?
Have you followed the updated installation instructions?
If so and you’re still having problems, what version of HA are you on? Did you use custom_updater to install the “element” named “sun”, and what version of custom_updater do you have?
I just read the instruction after writing my request… so now i have a folder called sun. Must i delete the old sun.py from the custom_component folder?
I used custom_updater to install the sun component and i run 0.88.1
I just noticed that custom_updater disappeared from the tracker card…
That’s a good question. I’m not 100% sure if it is required, but I would delete it. I’ll have to do some more testing to see if having custom_components/sun.py
interferes with the files in custom_components/sun
. If it does, then I’ll need to update the installation instructions (again.)
EDIT: I just copied custom_components/sun/__init__.py
to custom_components/sun.py
and restarted HA. It did not seem to cause any problems.
I don’t use the tracker card, but I believe others have run into similar problems. You might want to read previous posts in this topic; there might be some clues.
I deleted sun.py from custom_components/ and it seems all is working.
Well, I can’t explain that. I even went back and tried removing the sun folder and adding back custom_components/sun.py
and restarting. It worked (as long as I didn’t have any automations that used a sun trigger.) Then I stopped HA and added the sun folder back in, added the automation with a sun trigger back in, then restarted HA. Everything still worked even with these files still present:
custom_components/sun.py
custom_components/__pycache__/sun.cpython-36.pyc
But, I guess, as long as you got it working, then I’m happy!
Love this. I recently stumbled upon your component because of daylight savings time and an automation I have.
I have an automatic (smart) door on my chicken coop that closes 30 minutes after sunset everyday. How ever it uses tomorrows sunset since the trigger happens after sunset. This caused my chicken coop door to stay open an hour later than it should have.
I came to forum looking at how I can store todays sunset as a sensor until midnight but I think your component might be better.
Sad that they wouldn’t let you merge this in.
Thanks for your work on this. I’ve been using the daylight attribute to calculate on/off times for my plant lighting to ensure they get at least x hours of light a day.
Now I just need to set up a light sensor so I can turn on the lights when its dark and cloudy during the day and I’ll be all set! Thanks again
Released 1.1.1
Apparently HA 0.92 will require all custom components to have a manifest.json file.
I’m not sure if it used to but your sun component (only) isn’t showing in my custom updater card. Is there anything special that prevents it?
I’m currently on __version__ = '1.1.0'
You’ll have to ask @ludeeus. (I don’t use the card, just the custom updater.) I recently made a bunch of changes to all my custom components to deal with a change coming in 0.92, while still trying to make sure they work with current and older HA versions. It’s getting pretty hard to do that.
Ok, I decided to reinstall all three of your components manually from scratch (Composite, Life360 and Sun) and now I have some weirdness which I don’t know who to direct at
I get double warnings at start up for your two of you updated components (plus the breaking changes component which has not changed and neither for the unchanged smartweather or rpi_power) but none for sun
I totally appreciate everything you say, (especially 'It’s getting pretty hard to do that.') I just wondered if any of this should be directed at you or @ludeeus?
Also, I added this back which I thought we no longer needed(?) and sun appeared back on the card - interestingly Life360 and Composite used to appear without it.
component_urls:
- https://raw.githubusercontent.com/pnbruckner/homeassistant-config/master/custom_components.json
The reason for that is that name is bypassed by the tool generating the “master” list
https://github.com/ludeeus/customjson/blob/master/customjson/defaults.py#L4
Why did you think that was no longer needed?
I seem to get the warnings in the logs twice as well but I think it only does that for custom_components that have a ‘normal’ py file AND the __init__.py
Huh? Why? Whatever.
It tracks mine but I have always had this:
custom_updater:
hide_sensor: false
track:
- components
- cards
- python_scripts
component_urls:
- https://raw.githubusercontent.com/pnbruckner/homeassistant-config/master/custom_components.json
I didn’t realise that we didn’t need to have that component URL (which is what @klogg is saying) but apparently we still do and I have always had this in my config so it’s always worked.
Perhaps because ‘everyone’ knows that it should be the core sun component?
FWIW, I considered moving this code to its own repository to make it compatible with the new HACS custom component. But I figured if I did then I should probably update it to incorporate the recent changes to the standard sun component. But they have diverged so much that would be a lot of work. So in the end I decided I wouldn’t.
But now that there is a new code owner of the standard sun component it might be worth making a request to add the desired new attributes (e.g., sunrise and/or sunset) if you feel strongly about it.
So, although I won’t delete this from my repo, at this point it should be considered dead (i.e., no new updates) and effectively unsupported.
How do we make a request to that person specifically?
Well, the official way to make a feature request is to create a new topic in this forum in the Feature Requests category. And the component’s owner can be found here. That name is a github username, which doesn’t always translate to usernames on this forum. So the official answer to your question, I think, is, you can’t.
Yeah, I know of the “feature request” section. I also know that the feature request is fairly useless to actually get features implemented. I can see it being doubly useless on a request for a feature addition to a component that already exists, and has existed for a long time. I guess it can’t hurt to try tho.
Hopefully nothing changes in HA to cause your existing component to break.
BTW, I looked at the current sun component compared to yours and I’m not sure what (if any) recent changes there have been to the regular component. The only thing I see looking at the code that’s in the regular component that’s not in yours is “rising”. But I don’t know if that was in there before or not either. Obviously the way everything is calculated looks pretty different, too.
Is that what you are referring to or is there something else?