More Mobile app sensor fixes (#22914)

* Ensure we only add a sensor once

* Ensure that we dont process updates for entities that arent what we were setup for

* Add debug logging to ease development of apps

* Use str representation
This commit is contained in:
Robbie Trencheny 2019-04-09 02:48:59 -07:00 committed by Charles Garwood
parent 64ea13104e
commit fd8d9747ef
4 changed files with 40 additions and 5 deletions

View file

@ -99,6 +99,9 @@ async def handle_webhook(hass: HomeAssistantType, webhook_id: str,
data = webhook_payload
_LOGGER.debug("Received webhook payload for type %s: %s", webhook_type,
data)
if webhook_type in WEBHOOK_SCHEMAS:
try:
data = WEBHOOK_SCHEMAS[webhook_type](webhook_payload)