From d0962407b795e34a73d05f9217a9646d7620914c Mon Sep 17 00:00:00 2001 From: pglab-electronics Date: Fri, 3 May 2024 21:30:13 +0000 Subject: [PATCH] There is no need for default value in the callback definition. --- homeassistant/components/pglab/__init__.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/pglab/__init__.py b/homeassistant/components/pglab/__init__.py index 5ba9aab1fab..6f26d09089f 100644 --- a/homeassistant/components/pglab/__init__.py +++ b/homeassistant/components/pglab/__init__.py @@ -1,4 +1,5 @@ """PG LAB Electronics integration.""" + from __future__ import annotations 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.""" # define the call back for pglab module to publish a mqtt message - async def mqtt_publish( - topic: str, payload: str, qos: int | None = 0, retain: bool | None = False - ) -> None: + async def mqtt_publish(topic: str, payload: str, qos: int, retain: bool) -> None: await mqtt.async_publish(hass, topic, payload, qos, retain) # define the call back for pglab module to subscribe to a mqtt message