Skip to content

Suppress NaN Readings from Log with RegEx #695

@ukiews

Description

@ukiews

Is it possible to suppress NaN readings from the log when using regex to get sensor values.

I am using a Shelly device with the Add-On and sensor for temp and humidity readings.
The values are published under the same topic, but they are only reported when the temp or humidity changes.
So the log is full of NaN readings when no value is reported:

[1/4/2025, 12:01:21 AM] [homebridge-mqttthing] This plugin generated a warning from the characteristic 'Current Relative Humidity': characteristic value expected valid finite number and received "NaN" (number). See https://homebridge.io/w/JtMGR for more info.
[1/4/2025, 12:01:21 AM] [homebridge-mqttthing] This plugin generated a warning from the characteristic 'Current Relative Humidity': characteristic value expected valid finite number and received "NaN" (number). See https://homebridge.io/w/JtMGR for more info.
[1/4/2025, 12:01:24 AM] [homebridge-mqttthing] This plugin generated a warning from the characteristic 'Current Relative Humidity': characteristic value expected valid finite number and received "NaN" (number). See https://homebridge.io/w/JtMGR for more info.
[1/4/2025, 12:01:24 AM] [homebridge-mqttthing] This plugin generated a warning from the characteristic 'Current Temperature': characteristic value expected valid finite number and received "NaN" (number). See https://homebridge.io/w/JtMGR for more info.
[1/4/2025, 12:01:24 AM] [homebridge-mqttthing] This plugin generated a warning from the characteristic 'Current Relative Humidity': characteristic value expected valid finite number and received "NaN" (number). See https://homebridge.io/w/JtMGR for more info.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions