mirror of
https://github.com/home-assistant/core.git
synced 2025-08-04 13:15:18 +02:00
@balloob requested fixes
This commit is contained in:
@@ -24,8 +24,6 @@ omit =
|
||||
homeassistant/components/envisalink.py
|
||||
homeassistant/components/*/envisalink.py
|
||||
|
||||
homeassistant/components/foursquare.py
|
||||
|
||||
homeassistant/components/insteon_hub.py
|
||||
homeassistant/components/*/insteon_hub.py
|
||||
|
||||
@@ -128,6 +126,7 @@ omit =
|
||||
homeassistant/components/garage_door/wink.py
|
||||
homeassistant/components/garage_door/rpi_gpio.py
|
||||
homeassistant/components/hdmi_cec.py
|
||||
homeassistant/components/foursquare.py
|
||||
homeassistant/components/ifttt.py
|
||||
homeassistant/components/joaoapps_join.py
|
||||
homeassistant/components/keyboard.py
|
||||
|
@@ -76,7 +76,7 @@ class FoursquarePushReceiver(HomeAssistantView):
|
||||
"""Handle pushes from the Foursquare API."""
|
||||
|
||||
requires_auth = False
|
||||
url = "/foursquare"
|
||||
url = "/api/foursquare"
|
||||
name = "foursquare"
|
||||
|
||||
def __init__(self, hass, push_secret):
|
||||
@@ -92,9 +92,8 @@ class FoursquarePushReceiver(HomeAssistantView):
|
||||
_LOGGER.error("Received Foursquare push with invalid"
|
||||
"push secret! Data: %s", raw_data)
|
||||
return
|
||||
parsed_payload = {}
|
||||
for key, val in raw_data.items():
|
||||
if key == "secret":
|
||||
continue
|
||||
parsed_payload[key] = json.loads(val)
|
||||
parsed_payload = {
|
||||
key: json.loads(val) for key, val in raw_data.items()
|
||||
if key != "secret"
|
||||
}
|
||||
self.hass.bus.fire(EVENT_PUSH, parsed_payload)
|
||||
|
Reference in New Issue
Block a user