For custom components, this is now how it’s “supposed to be.” They purposely decided to make using custom components more complicated. They thought it was a good idea, but I suspect they didn’t realize how much of an effect this would have. But, it is what it is, and hopefully it will be better in the long run (which I’m sure was the thinking.)
First, I tried to update the standard sun component, but it was rejected. They don’t want to update it anymore. They want to replace it, but nobody has signed up to do that AFAIK. (Look back in this topic and you’ll see what I’m talking about.)
But, if you ever want to go back to the standard sun component, simply delete the custom_components/sun folder and restart. Presto magico, you’re back to the standard sun component!
I know this isn’t a great situation, but it’s due to the “great migration”, and there’s not much I can do about it, other than try to figure out how to deal with it.
Sorry to labour the point but if it is important which version of HA I am on, what will happen when I next upgrade (he says, wondering if it is sometimes a misnomer )?
The funny (“funny” as in “sad”) part of this is the automation sun platform doesn’t actually use the sun component! Both the sun component, and the automation sun platform, use the sun helper (homeassistant/helpers/sun.py). So this is all “make work” for no good reason.
yes, I am aware of that now. My main system is still on 84.3 while my other is on 87.1 . The first doesnt ‘know’ yet, the second is lenient …so no issues just yet, not even a warning at all. Even when using the Check Homeassistant Configuration add-on, there are no warnings whatsoever. I wonder why that add-on even exists…
You can still use the sun.sun entity in template triggers and conditions if you want. They have nothing to do with trigger platform: sun or condition: sun.
right, I am tempted too… But for what I am experiencing just now already, Lovelace has a huge impact on front-end processing, especially with history graphs and the likes. where regular HA took its toll with my Hue setup rendering the constant Unavailable for lights and Hub, Lovelace is much worse in that department. reason alone for me to be very very careful with my Homeautomation setup, and not rendering it useless for the family…
So I don’t understand why I don’t have any errors with this and made no changes at all. I use the sun elevation in an automation…
Phil, can you give installation instructions for this custom component as you see them at the moment. I am also using hassio but it’s Home Assistant so should be generic anyway?
I haven’t figured that out myself yet. E.g., I have a checkout of the dev branch and copied my sun.py right into custom_components. It seemed to work in general, but depending on what I did I might see errors and/or notifications, and then again, I might not. But what I never saw on the Info page was the warning about using a custom component. (Weird, especially since it was in home-assistant.log!)
As far as I can tell, the instructions are … posted above.
But klogg said he couldn’t implement them all on hassio. Since I don’t use it I can’t comment on how it constrains a user. Checkout the instructions above and let me know what you think!
I guess I’ll spend some more time trying to figure out how the changes to the loader work. Maybe I can figure out why it seems to be so random, and what is absolutely necessary to make it (i.e., the custom sun component) work correctly. It all seems, well…
Regarding hassio, wow, seems ridiculously limited. I suppose there must be advantages to offset the downsides.
ERROR (MainThread) [homeassistant.setup] Error during setup of component sun
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/setup.py", line 154, in _async_setup_component
component.setup, hass, processed_config) # type: ignore
AttributeError: module 'custom_components.sun' has no attribute 'setup'