diff --git a/homeassistant/components/command_line/notify.py b/homeassistant/components/command_line/notify.py index c41e26c21bb..412456ff6e5 100644 --- a/homeassistant/components/command_line/notify.py +++ b/homeassistant/components/command_line/notify.py @@ -3,6 +3,7 @@ from __future__ import annotations import logging import subprocess +from typing import Any import voluptuous as vol @@ -46,7 +47,7 @@ class CommandLineNotificationService(BaseNotificationService): self.command = command self._timeout = timeout - def send_message(self, message="", **kwargs) -> None: + def send_message(self, message: str = "", **kwargs: Any) -> None: """Send a message to a command line.""" with subprocess.Popen( self.command, diff --git a/homeassistant/components/file/notify.py b/homeassistant/components/file/notify.py index 4a0b4c11ca6..3238fe91102 100644 --- a/homeassistant/components/file/notify.py +++ b/homeassistant/components/file/notify.py @@ -2,7 +2,7 @@ from __future__ import annotations import os -from typing import TextIO +from typing import Any, TextIO import voluptuous as vol @@ -48,7 +48,7 @@ class FileNotificationService(BaseNotificationService): self.filename = filename self.add_timestamp = add_timestamp - def send_message(self, message="", **kwargs) -> None: + def send_message(self, message: str = "", **kwargs: Any) -> None: """Send a message to a file.""" file: TextIO if not self.hass.config.config_dir: