core: Temperature entity of motion and contact sensors unavailable once value is lower than 1

The problem

Motion sensors (lumi.sensor_motion.aq2 / RTCGQ11LM) are of state unavailable once the temperature of the sensor is reported below 1 degrees. It comes back once the temperature rises.

While the temperature itself is available and shown e. g. in Phoscon, it is not in deCONZ. This is why I assume this is a deCONZ integration error. (otherwise I would have reported this at https://github.com/dresden-elektronik/deconz-rest-plugin/issues)

grafik

grafik

grafik

What version of Home Assistant Core has the issue?

core-2022.9.7

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

deCONZ

Link to integration documentation on our website

https://www.home-assistant.io/integrations/deconz

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

Two things happened during the last days:

  1. Temperatures went down (assumption: error has always been there)
  2. deCONZ has been updated to v2.19.3 (from v2.19.1) (assumption: error has been introduced with v2.19.3)

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 24 (8 by maintainers)

Most upvoted comments

Oops. Just wanted to reply that there is a service to change debug logging for an integration without reloading.

Which one? Where’s more information on that service?

https://www.home-assistant.io/integrations/logger/

There is a service to set debug logging I think, haven’t used it myself

I wrote up a test to validate it working with negative temperatures, which it does. Without logs I can’t proceed here.

async def test_negative_temperature_values(hass, aioclient_mock):
    """Test sensor with negative temperature."""
    data = {
        "sensors": {
            "1": {
                "config": {
                    "battery": None,
                    "offset": 0,
                    "on": True,
                    "reachable": True,
                },
                "ep": 1,
                "etag": "1220e5d026493b6e86207993703a8a71",
                "manufacturername": "LUMI",
                "modelid": "lumi.weather",
                "name": "Mi temperature 1",
                "state": {
                    "lastupdated": "2019-05-05T14:39:00",
                    "temperature": -2182,
                },
                "swversion": "20161129",
                "type": "ZHATemperature",
                "uniqueid": "00:15:8d:00:02:45:dc:53-01-0402",
            }
        }
    }
    with patch.dict(DECONZ_WEB_REQUEST, data):
        await setup_deconz_integration(hass, aioclient_mock)

    assert hass.states.get("sensor.mi_temperature_1").state == "-21.8"