Fixed another occurrence of "Subscripted generics cannot be used" etc. error

This commit is contained in:
Fabio Manganiello 2023-04-01 23:34:22 +02:00
parent e2e73d0fdb
commit 3f3726c50a
Signed by: blacklight
GPG key ID: D90FBA7F76362774
3 changed files with 1 additions and 1 deletions

View file

@ -246,7 +246,7 @@ class SensorPlugin(RunnablePlugin, SensorEntityManager, ABC):
return events
# Scalar case
if isinstance(old_data, (Numeric, NoneType)) and isinstance(
if isinstance(old_data, (int, float, NoneType)) and isinstance(
new_data, (int, float)
):
return self._process_scalar_threshold_events(