Why is sensor.season showing lower case state?

why would sensor.season show lowercase while all its translations files are capitalized? some time ago before Lovelace I used _stateDisplay customization to have the state use a capital, but since that isn’t supported any longer, Im stuck with this:

21

It seems not to pick up the translations file which says:


{
    "state": {
        "autumn": "Autumn",
        "spring": "Spring",
        "summer": "Summer",
        "winter": "Winter"
    }
}

anyone else with an ‘Autumn’ ??

if reloading (ctrl+f5) doesn’t fix it, write up a PR

No, nothing fixes it.

Wouldn’t know how to write the PR, since all the code seems to be there ?

A bug report I would manage :wink:

That’s what I meant. Sorry!

cool. Done: sensor.season shows state in lowercase · Issue #28704 · home-assistant/core · GitHub

Well, it’s spring where I am, but my season sensor shows up correctly, i.e. with capitalised state name.

In the issue you created I saw that you are customising the icon - this should not be necessary because the sensor already shows 4 different icons by default depending on the season. Have you tried removing all the customisations from the sensor and see if that still does not fix the issue?

Using version 0.99, sensor.season displays the current season as Autumn.

Screenshot%20from%202019-11-11%2021-23-53

I added Marius’ customization, restarted Home Assistant, and it continues to display it as Autumn.

Screenshot%20from%202019-11-11%2021-18-06

Should have noticed before, and reported, but it does show capitalized in the iOS app. Lowercase is on desktop browser.

And yes, I’ve tried without customization also.

What does it say in dev-tools states?

below my own template sensor

Im baffled, look what is showing now:

24

it turned capitalized over night… and now the moon sensor shows unaltered state, in stead of ‘Waxing gibbous’, which it did in the other screenshot…

tested in Chrome, Safari and Firefox btw, all latest versions.

I don’t use the season sensor, but I’ve wanted to try out “moon” for a while. You inspired me to give it a shot. I added a “sensor” card and I see the unaltered state, “waxing_gibbous,” too. Then I added an “entities” card with both sun and moon, and that shows the text correctly, as in the first post.

I have no answer, mostly just posting to confirm you’re not the only one seeing this.

ok thanks for chiming in.
mine is back to the first post again. All a bit unpredictable.
Iphone app is right still, that is, on the 11pro, my older 6s shows what the desktop version shows.

So is this a bug in 0.101?

no, I think it has been there forever. Hence my customizations I used since way back…

I don’t understand. How can it be there ‘forever’ if I don’t see the issue in 0.99?

Or are you saying that it’s only due to luck that I’ve never seen the issue?

All I can say I’ve had the issue a long time and needed the customization for it. I even had the icon template before it apparently got adopted natively ( which I hadn’t noticed since yesterday…)

Must be a post about the template here somewhere, @petro and I discussed the capitalization in JS at length.

And remember: the fact you can’t see things doesn’t mean they don’t exist…

I think the phrase is : - “Just because you’re paranoid doesn’t mean they’re not out to get you”

But we (well me at least) don’t think you’re crazy :crazy_face:

what card are you using to display the sensor?

I don’t think religion is a factor here.