diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2025-09-14 16:55:21 +0200 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2025-09-14 16:55:21 +0200 |
commit | fa889a986cbfc8a3b321bfef3e32a9efa8471d70 (patch) | |
tree | 8debdc9f73ce9f564371895fcdfbee309a661428 | |
parent | 05882fe32eadb74e69064744a16522b5e8de5d82 (diff) |
Switch temperature unit to °C since HASS now drops anything using °c
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | init.lua | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -65,7 +65,7 @@ function read_data() -- sen5x.pm4 : pm4/10 == PM4.0 concentration [µg/m³] -- sen5x.pm10 : pm10/10 == PM10 concentration [µg/m³] -- sen5x.humidity : humidity/100 == Humidity [%] - -- sen5x.temperature : temperature/200 == Temperature [°c] + -- sen5x.temperature : temperature/200 == Temperature [°C] -- sen5x.voc : voc/10 == VOC [?] -- sen5x.nox : nox/10 == NOx [?] end @@ -189,7 +189,7 @@ function hass_register() table.insert(publish_queue, {"homeassistant/sensor/" .. device_id .. "/pm10/config", hass_pm10}) if product_name ~= "SEN50" then - local hass_temp = string.format('{%s,"name":"Temperature","object_id":"%s_temperature","unique_id":"%s_temperature","device_class":"temperature","unit_of_measurement":"°c","value_template":"{{value_json.temperature_celsius}}"}', hass_entity_base, device_id, device_id) + local hass_temp = string.format('{%s,"name":"Temperature","object_id":"%s_temperature","unique_id":"%s_temperature","device_class":"temperature","unit_of_measurement":"°C","value_template":"{{value_json.temperature_celsius}}"}', hass_entity_base, device_id, device_id) table.insert(publish_queue, {"homeassistant/sensor/" .. device_id .. "/temperature/config", hass_temp}) local hass_humi = string.format('{%s,"name":"Humidity","object_id":"%s_humidity","unique_id":"%s_humidity","device_class":"humidity","unit_of_measurement":"%%","value_template":"{{value_json.humidity_relpercent}}"}', hass_entity_base, device_id, device_id) |