mirror of
https://github.com/home-assistant/core.git
synced 2025-08-03 12:45:28 +02:00
There is no need for default value in the callback definition.
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
"""PG LAB Electronics integration."""
|
"""PG LAB Electronics integration."""
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from pypglab.mqtt import Client, Sub_State, Subcribe_CallBack
|
from pypglab.mqtt import Client, Sub_State, Subcribe_CallBack
|
||||||
@@ -26,9 +27,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||||||
"""Set up PG LAB Electronics integration from a config entry."""
|
"""Set up PG LAB Electronics integration from a config entry."""
|
||||||
|
|
||||||
# define the call back for pglab module to publish a mqtt message
|
# define the call back for pglab module to publish a mqtt message
|
||||||
async def mqtt_publish(
|
async def mqtt_publish(topic: str, payload: str, qos: int, retain: bool) -> None:
|
||||||
topic: str, payload: str, qos: int | None = 0, retain: bool | None = False
|
|
||||||
) -> None:
|
|
||||||
await mqtt.async_publish(hass, topic, payload, qos, retain)
|
await mqtt.async_publish(hass, topic, payload, qos, retain)
|
||||||
|
|
||||||
# define the call back for pglab module to subscribe to a mqtt message
|
# define the call back for pglab module to subscribe to a mqtt message
|
||||||
|
Reference in New Issue
Block a user