Don't swap the argument of `SensorPlugin.publish_entities` with a list if not required
This commit is contained in:
parent
0047d85b9d
commit
8e0f88ea16
|
@ -333,8 +333,7 @@ class SensorPlugin(RunnablePlugin, SensorEntityManager, ABC):
|
||||||
def publish_entities(
|
def publish_entities(
|
||||||
self, entities: SensorDataType, *args, **kwargs
|
self, entities: SensorDataType, *args, **kwargs
|
||||||
) -> Collection[Entity]:
|
) -> Collection[Entity]:
|
||||||
entities_args = [entities] if isinstance(entities, (int, float)) else entities
|
return super().publish_entities(entities, *args, **kwargs) # type: ignore
|
||||||
return super().publish_entities(entities_args, *args, **kwargs) # type: ignore
|
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
@action
|
@action
|
||||||
|
|
Loading…
Reference in New Issue