-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
weather integration: change partlycloudy to partly-cloudy #321
Comments
It's not the aim of Home Assistant to be consistent with Material Design Icons. It was a mistake to blindly adopt the MDI icon names as our conditions, as that has caused it to create the assumption that they should be aligned to begin with. This issue would be a breaking change for many people and it would have 0 added value in the backend or in the frontend. For your templates, you can just create a look up table. {% set weather_icons = {
"partlycloudy": "mdi:bla",
"sunny": "mdi:sunny"
} %}
Icon is {{ weather_icons["partlycloudy"] }} |
We still use material design icons and so credit them. However we use them in the frontend, we don't use them to drive our architecture design. |
I think that this template below also doesn't work for
|
of course, I expected that ;-) I have dealt with that condition in my bigger template above as you can see. Had to. It merely underlines the plethora of different states the various HA weather platforms and sensors hold. As a matter of fact, it is so small it doesn't even require an architecture discussion in the first place according to https://developers.home-assistant.io/docs/en/entity_index.html#changing-the-entity-model The choice btw for 'exceptional' further underlines that. It was an arbitrary choice, and could just as easily have been tornado if the component returns tornado... Again, the icon would have been easy in that case. The point should be clear now I would think. Really sorry if this would not pass, as said, such a small thing to make HA syntax consistent, no issue at all for breaking changes, only benefits. Probably small too, but hey, if you don't value the small (old dutch saying) I'll leave at this, be glad to work at it if green-lighted. If not, well really sorry of course ;-) |
Hi, |
If we are going to change it then |
with aforementioned reason by @foreign-sub : of course that would be even better. Would require a little more work ;-) |
Not going to implement, not worth the breaking change. |
Context
The issue motivating this decision, and any context that influences or constrains the decision.
following discussion on #29569 this aims to use partly-cloudy all through HA's weather integrations and backend. Will Pr all integrations and documentation accordingly
Proposal
The change that you're proposing.
To change the weather integration default state
partlycloudy
topartly-cloudy
because it is the only condition left without a dash between single words.This would also make it easier to create templates based on these condition states, eg
and would make the HA syntax consistent.
Consequences
What becomes easier or more difficult to do and any risks introduced by the change that will need to be mitigated.
As said it becomes much easier to create templates based on the conditions, (because of no exception without
-
), and as a consequence follow suit with the mdi icon repository which also holds a dash between all single words. Everywhere.Put differently, this change would only hold advantages, and no disadvantages at all. A simple change in the mentioned integrations and documentation would suffice.
It is in fact quite remarkable this hasn't been implemented earlier, but, given the fact a few Mdi icons have been added lately, it is a fine moment to repair this Homeassistant wide now.
The text was updated successfully, but these errors were encountered: