Skip to content
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

Template sensor change #4

Open
horbye opened this issue Aug 10, 2023 · 0 comments
Open

Template sensor change #4

horbye opened this issue Aug 10, 2023 · 0 comments

Comments

@horbye
Copy link

horbye commented Aug 10, 2023

Since recent changes in HA, I got some errors in the log file
has device class 'None', state class 'None' unit 'State' and suggested precision 'None' thus indicating it has a numeric value; however, it has the non-numeric value: '' (<class 'str'>) value

Removed this line, from each template sensor, solved it
unit_of_measurement: "State"

So they look like this:
sensor:

  • platform: template
    sensors:
    komfovent_on_off:
    friendly_name: "Komfovent On Off"
    value_template: >-
    {% set mapper = {
    '0' : 'Off',
    '1' : 'On'} %}
    {% set state = states('sensor.komfovent_on_off_num') %}
    {{ mapper[state] if state in mapper else 'Unknown' }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant