add empy all groups view. Makes Brilliant Lightpad work (#20564)

This commit is contained in:
merc1031 2019-01-29 09:26:07 -08:00 committed by Paulus Schoutsen
parent e0e5b860e4
commit 48f0e8311b
3 changed files with 40 additions and 2 deletions

View file

@ -56,6 +56,28 @@ class HueUsernameView(HomeAssistantView):
return self.json([{'success': {'username': '12345678901234567890'}}])
class HueAllGroupsStateView(HomeAssistantView):
"""Group handler."""
url = '/api/{username}/groups'
name = 'emulated_hue:all_groups:state'
requires_auth = False
def __init__(self, config):
"""Initialize the instance of the view."""
self.config = config
@core.callback
def get(self, request, username):
"""Process a request to make the Brilliant Lightpad work."""
if not is_local(request[KEY_REAL_IP]):
return self.json_message('only local IPs allowed',
HTTP_BAD_REQUEST)
return self.json({
})
class HueGroupView(HomeAssistantView):
"""Group handler to get Logitech Pop working."""