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
sensor.season shows state in lowercase #28704
Comments
update just to add that behavior seems to be different on various devices. Got a new iPhone on which the states are always correct (for now), while desktop browsers show the changing states mentioned in the first post. Also notable: the sensors seem to be trading places: when moon is displaying lowercase state, season is correct, and vice versa.. btw this is a fine example for the need to upgrade the moon sensor to show these icons depending on state: will check that independently from this bug report ;-) |
I have the same, it worked before (displaying translations Dutch) but
stopped working sometimes, same for moon.
I made sensor templates to have a workaround.
- platform: template
sensors:
maanstand:
entity_id: sensor.moon
friendly_name: 'Maan'
icon_template: >-
{% set value = states('sensor.moon') %}
{% if value == 'new_moon' %}
mdi:moon-new
{% elif value == 'waxing_crescent' %}
mdi:moon-waxing-crescent
{% elif value == 'first_quarter' %}
mdi:moon-first-quarter
{% elif value == 'waxing_gibbous' %}
mdi:moon-waxing-gibbous
{% elif value == 'full_moon' %}
mdi:moon-full
{% elif value == 'waning_gibbous' %}
mdi:moon-waning-gibbous
{% elif ivalue == 'last_quarter' %}
mdi:moon-last-quarter
{% elif value == 'waning_crescent' %}
mdi:moon-waning-crescent
{% endif %}
value_template: >-
{% set value = states('sensor.moon') %}
{% if value == 'new_moon' %}
Nieuwe Maan
{% elif value == 'waxing_crescent' %}
Jonge Maansikkel
{% elif value == 'first_quarter' %}
Eerste Kwartier
{% elif value == 'waxing_gibbous' %}
Wassende Maan
{% elif value == 'full_moon' %}
Volle Maan
{% elif value == 'waning_gibbous' %}
Afnemende Maan
{% elif value == 'last_quarter' %}
Laatste Kwartier
{% elif value == 'waning_crescent' %}
Asgrouwe Maan
{% endif %}
- platform: template
sensors:
seizoen:
entity_id: sensor.season
friendly_name: 'Seizoen'
icon_template: >-
{% set value = states('sensor.season') %}
{% if value == 'spring' %}
mdi:flower
{% elif value == 'summer' %}
mdi:sunglasses
{% elif value == 'autumn' %}
mdi:leaf
{% elif value == 'winter' %}
mdi:snowflake
{% endif %}
value_template: >-
{% set value = states('sensor.season') %}
{% if value == 'spring' %}
Voorjaar
{% elif value == 'summer' %}
Zomer
{% elif value == 'autumn' %}
Herfst
{% elif value == 'winter' %}
Winter
{% endif %}
…On Wed, Nov 13, 2019 at 7:30 AM Marius ***@***.***> wrote:
*update*
just to add that behavior seems to be different on various devices. Got a
new iPhone on which the states are always correct (for now), while desktop
browsers show the changing states mentioned in the first post.
Also notable: the sensors seem to be trading places: when moon is
displaying lowercase state, season is correct, and vice versa..
[image: Schermafbeelding 2019-11-13 om 07 27 21]
<https://user-images.githubusercontent.com/33354141/68738624-153b1800-05e7-11ea-9a83-067dd59535d8.png>
btw this is a fine example for the need to upgrade the moon sensor to show
these icons depending on state:
[image: Schermafbeelding 2019-11-13 om 07 28 42]
<https://user-images.githubusercontent.com/33354141/68738724-592e1d00-05e7-11ea-8af8-fcbca522a40a.png>
will check that independently from this bug report ;-)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#28704>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABJR36ONQPXXQNJEESD2XPTQTONHPANCNFSM4JLZJNSA>
.
|
since you mentioned it here, you can also customize the moon sensor with this icon template:
|
Lol yes, that's a much simpler solution, will change it in my yaml ;-)
…On Wed, Nov 13, 2019 at 12:19 PM Marius ***@***.***> wrote:
since you mentioned it here, you can also customize the moon sensor with
this icon template:
icon: >
if (state === 'full_moon') return 'mdi:moon-full';
if (state === 'new_moon') return 'mdi:moon-new';
return 'mdi:moon-' + state.replace('_','-');
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#28704>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABJR36I4NZ3OVPP367DGN63QTPPF5ANCNFSM4JLZJNSA>
.
|
Very similar to home-assistant/frontend#2372 |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. |
Home Assistant release with the issue:
101.3
Last working Home Assistant release (if known):
never...
Operating environment (Hass.io/Docker/Windows/etc.):
Hassio, Rpi4
Integration:
Description of problem:
sensor.season and sensor.moon show lowercase state sometimes.
While all the 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:
Problem-relevant
configuration.yaml
entries and (fill out even if it seems unimportant):Traceback (if applicable):
Additional information:
have also set some customization, but even without that, the sensor shows 'autumn' instead of 'Autumn' and 'waxing_gibbous' instead of 'Waxing gibbous'.
translation file:
The text was updated successfully, but these errors were encountered: