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

HA 2022.4.1 Unit of Measurement Feature needs native_unit_of_measurement #794

Open
RJ-Make opened this issue Apr 9, 2022 · 13 comments
Open
Labels
bug Something isn't working

Comments

@RJ-Make
Copy link

RJ-Make commented Apr 9, 2022

The problem

With the introduction of the Unit of Measurement feature in HA 2022.4.1 it appears that native_unit_of_measurement needs to be added.

@RJ-Make RJ-Make added the bug Something isn't working label Apr 9, 2022
@CloCkWeRX
Copy link

https://developers.home-assistant.io/docs/core/entity/sensor/ suggests this is optional, what behaviours are you seeing that suggest it is required?

@RJ-Make
Copy link
Author

RJ-Make commented Apr 10, 2022

https://developers.home-assistant.io/docs/core/entity/sensor/ suggests this is optional, what behaviours are you seeing that suggest it is required?

It appears without it you cannot use the new Unit Of Measurement feature.

2022-04-10_10-05-27

My particular use-case would allow me to convert a manual added food thermometer from Celsius to Fahrenheit.

@lindsaymarkward
Copy link

Hi, I appear to have a similar issue. I can't work out how to get my Inkbird IBBQ-4T to give me degrees celsius using localtuya. As per the forum discussion, it used to work if I set the unit to °F (using the exact ° symbol) and HA would auto-convert to C since that's my general setting: https://community.home-assistant.io/t/cannot-get-tuya-integration-to-work/226356/19
Now, no matter what I set in localtuya, I can't get my temperatures to convert - they always report in Fahrenheit with whatever unit I enter next to the value.
Can this be updated now please?
Thank you!

@barrymossel
Copy link

Hi, I appear to have a similar issue. I can't work out how to get my Inkbird IBBQ-4T to give me degrees celsius using localtuya. As per the forum discussion, it used to work if I set the unit to °F (using the exact ° symbol) and HA would auto-convert to C since that's my general setting: https://community.home-assistant.io/t/cannot-get-tuya-integration-to-work/226356/19 Now, no matter what I set in localtuya, I can't get my temperatures to convert - they always report in Fahrenheit with whatever unit I enter next to the value. Can this be updated now please? Thank you!

Same for me. Quite annoying.

@outrun0506
Copy link

outrun0506 commented Aug 2, 2022

Now, no matter what I set in localtuya, I can't get my temperatures to convert - they always report in Fahrenheit with whatever unit I enter next to the value.

Can this be updated now please?

Thank you!

Hi, same for me. Also using a Inkbird IBBQ-4T.

Just created a Tenplate Sensor to covert for now.

@barrymossel
Copy link

Now, no matter what I set in localtuya, I can't get my temperatures to convert - they always report in Fahrenheit with whatever unit I enter next to the value.
Can this be updated now please?
Thank you!

Hi, same for me. Also using a Inkbird IBBQ-4T.

Just created a Tenplate Sensor to covert for now.

Could you share the sensor please? I don't have any hopes for this repository to be honest, looking at all the open pull requests and issues.

@outrun0506
Copy link

Will do, currently I'm on vacation. Back home I'll share my Sensor

@outrun0506
Copy link

@barrymossel

Here is my Sensor Config for convert °F to °C:

- platform: template
  sensors:
    ibbq_sensor1_c:
      friendly_name: "iBBQ Sensor 1"
      unit_of_measurement: '°C'
      value_template: >-
        {{ (((states.sensor.ibbq_sensor1.state | float - 32 )) * 5/9) | round(1) }}
    ibbq_sensor2_c:
      friendly_name: "iBBQ Sensor 2"
      unit_of_measurement: '°C'
      value_template: >-
        {{ (((states.sensor.ibbq_sensor2.state | float - 32 )) * 5/9) | round(1) }}
    ibbq_sensor3_c:
      friendly_name: "iBBQ Sensor 3"
      unit_of_measurement: '°C'
      value_template: >-
        {{ (((states.sensor.ibbq_sensor3.state | float - 32 )) * 5/9) | round(1) }}
    ibbq_garraum_c:
      friendly_name: "iBBQ Garraum"
      unit_of_measurement: '°C'
      value_template: >-
        {{ (((states.sensor.ibbq_sensor4.state | float - 32 )) * 5/9) | round(1) }}

@barrymossel
Copy link

@barrymossel

Here is my Sensor Config for convert °F to °C:

- platform: template
  sensors:
    ibbq_sensor1_c:
      friendly_name: "iBBQ Sensor 1"
      unit_of_measurement: '°C'
      value_template: >-
        {{ (((states.sensor.ibbq_sensor1.state | float - 32 )) * 5/9) | round(1) }}
    ibbq_sensor2_c:
      friendly_name: "iBBQ Sensor 2"
      unit_of_measurement: '°C'
      value_template: >-
        {{ (((states.sensor.ibbq_sensor2.state | float - 32 )) * 5/9) | round(1) }}
    ibbq_sensor3_c:
      friendly_name: "iBBQ Sensor 3"
      unit_of_measurement: '°C'
      value_template: >-
        {{ (((states.sensor.ibbq_sensor3.state | float - 32 )) * 5/9) | round(1) }}
    ibbq_garraum_c:
      friendly_name: "iBBQ Garraum"
      unit_of_measurement: '°C'
      value_template: >-
        {{ (((states.sensor.ibbq_sensor4.state | float - 32 )) * 5/9) | round(1) }}

Thanks!

@garry0garry
Copy link

Please add the unit_of_measurement parameter.
#1074

@brentk7
Copy link

brentk7 commented Jan 7, 2023

Also ran into this issue

@polskikrol
Copy link

Yup, I have the same issue as well.

@wildekek
Copy link

Same, this would be a very useful feature for anyone using the metric system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

9 participants