Ensure service calls are typed [k-n] (#62917)
* Ensure service calls are typed [k-n] * Ensure service calls are typed in mazda * Adjust mazda * Add mazda comment Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
parent
1c7efe7047
commit
8cc0df7b72
14 changed files with 47 additions and 32 deletions
|
@ -22,7 +22,7 @@ from homeassistant.const import (
|
|||
EVENT_HOMEASSISTANT_START,
|
||||
EVENT_HOMEASSISTANT_STOP,
|
||||
)
|
||||
from homeassistant.core import CoreState, HomeAssistant
|
||||
from homeassistant.core import CoreState, HomeAssistant, ServiceCall
|
||||
from homeassistant.exceptions import ConfigEntryAuthFailed, ConfigEntryNotReady
|
||||
from homeassistant.helpers import (
|
||||
aiohttp_client,
|
||||
|
@ -146,7 +146,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
|
||||
hass.config_entries.async_setup_platforms(entry, PLATFORMS)
|
||||
|
||||
async def unregister_webhook(_: None) -> None:
|
||||
async def unregister_webhook(call: ServiceCall | None) -> None:
|
||||
if CONF_WEBHOOK_ID not in entry.data:
|
||||
return
|
||||
_LOGGER.debug("Unregister Netatmo webhook (%s)", entry.data[CONF_WEBHOOK_ID])
|
||||
|
@ -163,7 +163,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
"No webhook to be dropped for %s", entry.data[CONF_WEBHOOK_ID]
|
||||
)
|
||||
|
||||
async def register_webhook(_: None) -> None:
|
||||
async def register_webhook(call: ServiceCall | None) -> None:
|
||||
if CONF_WEBHOOK_ID not in entry.data:
|
||||
data = {**entry.data, CONF_WEBHOOK_ID: secrets.token_hex()}
|
||||
hass.config_entries.async_update_entry(entry, data=data)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue