diff --git a/homeassistant/components/mobile_app/manifest.json b/homeassistant/components/mobile_app/manifest.json index 61e90e6bd8e..732a2495311 100644 --- a/homeassistant/components/mobile_app/manifest.json +++ b/homeassistant/components/mobile_app/manifest.json @@ -4,7 +4,7 @@ "config_flow": true, "documentation": "https://www.home-assistant.io/integrations/mobile_app", "requirements": ["PyNaCl==1.3.0", "emoji==0.5.4"], - "dependencies": ["http", "webhook", "person"], + "dependencies": ["http", "webhook", "person", "tag"], "after_dependencies": ["cloud", "camera"], "codeowners": ["@robbiet480"], "quality_scale": "internal" diff --git a/homeassistant/components/mobile_app/webhook.py b/homeassistant/components/mobile_app/webhook.py index d03505b0cb9..e7ff49f71f2 100644 --- a/homeassistant/components/mobile_app/webhook.py +++ b/homeassistant/components/mobile_app/webhook.py @@ -8,6 +8,7 @@ from aiohttp.web import HTTPBadRequest, Request, Response, json_response from nacl.secret import SecretBox import voluptuous as vol +from homeassistant.components import tag from homeassistant.components.binary_sensor import ( DEVICE_CLASSES as BINARY_SENSOR_CLASSES, ) @@ -544,9 +545,10 @@ async def webhook_get_config(hass, config_entry, data): @validate_schema({vol.Required("tag_id"): cv.string}) async def webhook_scan_tag(hass, config_entry, data): """Handle a fire event webhook.""" - hass.bus.async_fire( - "tag_scanned", - {"tag_id": data["tag_id"], "device_id": config_entry.data[ATTR_DEVICE_ID]}, - context=registration_context(config_entry.data), + await tag.async_scan_tag( + hass, + data["tag_id"], + config_entry.data[ATTR_DEVICE_ID], + registration_context(config_entry.data), ) return empty_okay_response()