INNER CODE UNIT · Python

async_press

dummylabs/thewatchman · custom_components/watchman/button.py:35

    async def async_press(self) -> None:
        """Handle the button press."""
        await self.hass.services.async_call(
            DOMAIN,
            REPORT_SERVICE_NAME,
            {"parse_config": True},
            blocking=True
        )
        report_path = get_config(self.hass, CONF_REPORT_PATH)
        await self.hass.services.async_call(
            "persistent_notification",
            "create",
            {
                "title": "🛡️Watchman",
                "message": f"Watchman Report is ready: {report_path}"
            }
        )

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…