I’ve had a pool sensor for some years, and it has worked fine on my frontend showing the correct temperature in degrees celsius. Setup is:
sensors.yaml:
- platform: mqtt
state_topic: "pool/temperature"
name: "Swimming Pool Temperature"
unit_of_measurement: "°C"
device_class: temperature
I’ve recently integrated with HomeKit.
configuration.yaml:
homeassistant:
unit_system: metric
homekit:
filter:
include_entities:
- sensor.swimming_pool_temperature
entity_config:
sensor.swimming_pool_temperature:
name: Pool Temperature
HomeKit displays the same (correct) temperature, without any unit (I’ve done further research - it seems like HomeKit never shows a unit):
When i ask Siri “what is the pool temperature” it replies “its -6 degrees celsius”
In other words, it thinks the temp coming from hass is “farenheit”, knows my iOS setting is for celsius, and converts 23F to -6C!
I have tried the following values for unit_of_measurement
, none work (some are the same as above, some result in 0.0 on HomeKit):
- celsius
- Celsius
- “celsius”
- “Celsius”
- “°C”
- °C
logs
I turned on debugging and here is some selected logs:
2019-09-25 11:18:19 DEBUG (MainThread) [homeassistant.components.homekit] Begin setup HomeKit
2019-09-25 11:18:21 DEBUG (SyncWorker_3) [pyhap.characteristic] set_value: Name to Home Assistant Bridge
2019-09-25 11:18:21 DEBUG (SyncWorker_3) [pyhap.characteristic] set_value: SerialNumber to default
2019-09-25 11:18:21 DEBUG (SyncWorker_3) [pyhap.characteristic] set_value: FirmwareRevision to 0.91.3
2019-09-25 11:18:21 DEBUG (SyncWorker_3) [pyhap.characteristic] set_value: Manufacturer to Home Assistant
2019-09-25 11:18:21 DEBUG (SyncWorker_3) [pyhap.characteristic] set_value: Model to Bridge
2019-09-25 11:18:21 DEBUG (SyncWorker_3) [pyhap.characteristic] set_value: SerialNumber to homekit.bridge
2019-09-25 11:18:25 DEBUG (SyncWorker_13) [homeassistant.components.homekit] Add "sensor.swimming_pool_temperature" as "TemperatureSensor"
2019-09-25 11:18:25 DEBUG (SyncWorker_13) [pyhap.characteristic] set_value: Name to Pool Temperature
2019-09-25 11:18:25 DEBUG (SyncWorker_13) [pyhap.characteristic] set_value: SerialNumber to default
2019-09-25 11:18:25 DEBUG (SyncWorker_13) [pyhap.characteristic] set_value: FirmwareRevision to 0.91.3
2019-09-25 11:18:25 DEBUG (SyncWorker_13) [pyhap.characteristic] set_value: Manufacturer to Home Assistant
2019-09-25 11:18:25 DEBUG (SyncWorker_13) [pyhap.characteristic] set_value: Model to Sensor
2019-09-25 11:18:25 DEBUG (SyncWorker_13) [pyhap.characteristic] set_value: SerialNumber to sensor.swimming_pool_temperature
2019-09-25 11:18:25 DEBUG (SyncWorker_13) [homeassistant.components.homekit] Driver start
2019-09-25 11:18:26 DEBUG (MainThread) [homeassistant.components.homekit.accessories] New_state: <state sensor.swimming_pool_temperature=23.1; unit_of_measurement=°C, friendly_name=Swimming Pool Temperature, device_class=temperature @ 2019-09-25T21:18:23.498451+10:00>
2019-09-25 11:18:26 DEBUG (SyncWorker_12) [pyhap.characteristic] set_value: CurrentTemperature to 23.0
2019-09-25 11:18:26 DEBUG (SyncWorker_12) [homeassistant.components.homekit.type_sensors] sensor.swimming_pool_temperature: Current temperature set to 23°C
additional
When I change my iOS device settings temperature unit to Farenheit, HomeKit displays the correct value in Farenheit (73.0) BUT when you ask Siri what the temperature is it reports “23 degrees farenheit” so it does the same conversion!
Internal HomeKit storage is in celsius, and is correctly set by Hass and we see correct unit conversion in iOS, its only Siri that gets it wrong when you ask to report the value from HomeKit…
My conclusion is that in fact this may be a bug in Siri, and Hass and HomeKit are both doing things correctly.
Can anyone help? Has anyone ever had this work correctly (or not)?