Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions custom_components/ecowitt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ def check_and_append_sensor(sensor):
"""Check the sensor for validity, and append to new entitiy list."""
if sensor not in SENSOR_TYPES:
if sensor not in IGNORED_SENSORS:
_LOGGER.warning("Unhandled sensor type %s", sensor)
_LOGGER.warning("Unhandled sensor type \"%s\"", sensor)
return None

# Is this a metric or imperial sensor, lookup and skip
Expand Down Expand Up @@ -271,13 +271,13 @@ async def _async_ecowitt_update_cb(weather_data):
for sensor in weather_data.keys():
if sensor not in SENSOR_TYPES:
if sensor not in IGNORED_SENSORS:
_LOGGER.warning("Unhandled sensor type %s value %s, "
_LOGGER.warning("Unhandled sensor type \"%s\", value: \"%s\", "
+ "file a PR.", sensor, weather_data[sensor])
elif (sensor not in ecowitt_data[REG_ENTITIES][TYPE_SENSOR]
and sensor not in ecowitt_data[REG_ENTITIES][TYPE_BINARY_SENSOR]
and sensor not in IGNORED_SENSORS
and check_imp_metric_sensor(sensor)):
_LOGGER.warning("Unregistered sensor type %s value %s received.",
_LOGGER.warning("Unregistered sensor type \"%s\" value \"%s\" received.",
sensor, weather_data[sensor])
# try to register the sensor
kind = check_and_append_sensor(sensor)
Expand All @@ -288,7 +288,7 @@ async def _async_ecowitt_update_cb(weather_data):
or sensor in ecowitt_data[REG_ENTITIES][TYPE_BINARY_SENSOR])
and sensor not in IGNORED_SENSORS
and not check_imp_metric_sensor(sensor)):
_LOGGER.warning("Removing sensor type %S.", sensor)
_LOGGER.warning("Removing sensor type \"%S\".", sensor)
old_sensors.append(sensor)

# If we have old sensors, delete them.
Expand Down
2 changes: 2 additions & 0 deletions custom_components/ecowitt/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
DATA_FREQ = "freq"
DATA_MODEL = "model"
DATA_READY = "ready"
DATA_RUNTIME = "runtime"
REG_ENTITIES = "registered"

DEFAULT_PORT = 4199
Expand Down Expand Up @@ -738,4 +739,5 @@
DATA_STATIONTYPE,
DATA_FREQ,
DATA_MODEL,
DATA_RUNTIME,
]