HomeKit component, humidity ok but temp reads 0.0

Hi all

I have two esp8266 bme280 sensors reporting into mosquito mqtt. Everything reads ok into Hassio homeassistant on my rpi.

Added in HomeKit and paired successfully. Humidity reads ok on both sensors but temp reading is 0.0 for both sensors.

Device class is set temperature and units are Celsius as the doco recommends.

Any ideas as to next steps for t/shooting?

Thanks

Glen

Try this first: https://www.home-assistant.io/components/homekit/#disable-auto-start

If it doesn’t work:

  1. Optional by helps with logs: Configure the filter to only include temperature sensor
  2. Configure HA logger (see below)
  3. Restart
  4. Try setting a new temperature in the states panel
  5. Optional: Post the log here (please Markdown formatted)

Logger config:

logger:
  default: warning  # error would work as well
  logs:
    homeassistant.components.homekit: debug
    pyhap.characteristic: debug

Ok. Turning on the logging showed the culprit.

It seemed it did not like the unit_of_meadurement being set to Celsius nor celsius (I had double checked spelling)

I commented out the unit line and now it works.

I don’t suppose the code only likes Fahrenheit does it???

Glen

I just checked the DemoSensor component with the temperature device class and everything works as expected, no issues.

I noticed a spelling mistake in meadurement, the entry for the customize section should be: unit_of_measurement: °C

Just to clarify:

  1. The temperature sensor is shown in the Home App, even when set to 0.0
  2. Does it show 0.0 in the Home Assistant frontend?

Can you post a screenshot of the entity in the states panel?

Sorry for the typo.

state_topic: “/Study/SensorTHP/Temperature”

unit_of_measurement: ‘celsius’

Is the actual line

The documentation indicates unit_of_measurement: should be celsius.

The value for unit_of_measurement would only be relevant if you don’t have the device_class setup, but I recommend the later.

Can you answer the other questions?
Maybe also try removing the unit line completely?

Hi,

I’ve set the units to °C as you suggested and it working as expected now! Thank you for the pointer.
I had correct numbers in the hass console, it was just getting across into homekit was where the issue was.

Thank you,

Glen

1 Like