forked from platypush/platypush
Dirty fix for "Subscripted generics cannot be used with class and instance checks" on Python < 3.10
This commit is contained in:
parent
98ec018292
commit
0047d85b9d
1 changed files with 1 additions and 1 deletions
|
@ -333,7 +333,7 @@ class SensorPlugin(RunnablePlugin, SensorEntityManager, ABC):
|
|||
def publish_entities(
|
||||
self, entities: SensorDataType, *args, **kwargs
|
||||
) -> Collection[Entity]:
|
||||
entities_args = [entities] if isinstance(entities, Numeric) else entities
|
||||
entities_args = [entities] if isinstance(entities, (int, float)) else entities
|
||||
return super().publish_entities(entities_args, *args, **kwargs) # type: ignore
|
||||
|
||||
@abstractmethod
|
||||
|
|
Loading…
Reference in a new issue