mirror of
https://github.com/home-assistant/core.git
synced 2025-04-25 01:38:02 +00:00
Remove goalfeed integration (#94129)
This commit is contained in:
parent
66785bbfc7
commit
a6bb70c5d2
@ -423,7 +423,6 @@ omit =
|
||||
homeassistant/components/gitlab_ci/sensor.py
|
||||
homeassistant/components/gitter/sensor.py
|
||||
homeassistant/components/glances/sensor.py
|
||||
homeassistant/components/goalfeed/*
|
||||
homeassistant/components/goodwe/__init__.py
|
||||
homeassistant/components/goodwe/button.py
|
||||
homeassistant/components/goodwe/coordinator.py
|
||||
|
@ -1,65 +0,0 @@
|
||||
"""Component for the Goalfeed service."""
|
||||
import json
|
||||
|
||||
import pysher
|
||||
import requests
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.const import CONF_PASSWORD, CONF_USERNAME
|
||||
from homeassistant.core import HomeAssistant
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.typing import ConfigType
|
||||
|
||||
# Version downgraded due to regression in library
|
||||
# For details: https://github.com/nlsdfnbch/Pysher/issues/38
|
||||
DOMAIN = "goalfeed"
|
||||
|
||||
CONFIG_SCHEMA = vol.Schema(
|
||||
{
|
||||
DOMAIN: vol.Schema(
|
||||
{
|
||||
vol.Required(CONF_USERNAME): cv.string,
|
||||
vol.Required(CONF_PASSWORD): cv.string,
|
||||
}
|
||||
)
|
||||
},
|
||||
extra=vol.ALLOW_EXTRA,
|
||||
)
|
||||
|
||||
GOALFEED_HOST = "feed.goalfeed.ca"
|
||||
GOALFEED_AUTH_ENDPOINT = "https://goalfeed.ca/feed/auth"
|
||||
GOALFEED_APP_ID = "bfd4ed98c1ff22c04074"
|
||||
|
||||
|
||||
def setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
||||
"""Set up the Goalfeed component."""
|
||||
conf = config[DOMAIN]
|
||||
username = conf.get(CONF_USERNAME)
|
||||
password = conf.get(CONF_PASSWORD)
|
||||
|
||||
def goal_handler(data):
|
||||
"""Handle goal events."""
|
||||
goal = json.loads(json.loads(data))
|
||||
|
||||
hass.bus.fire("goal", event_data=goal)
|
||||
|
||||
def connect_handler(data):
|
||||
"""Handle connection."""
|
||||
post_data = {
|
||||
"username": username,
|
||||
"password": password,
|
||||
"connection_info": data,
|
||||
}
|
||||
resp = requests.post(GOALFEED_AUTH_ENDPOINT, post_data, timeout=30).json()
|
||||
|
||||
channel = pusher.subscribe("private-goals", resp["auth"])
|
||||
channel.bind("goal", goal_handler)
|
||||
|
||||
pusher = pysher.Pusher(
|
||||
GOALFEED_APP_ID, secure=False, port=8080, custom_host=GOALFEED_HOST
|
||||
)
|
||||
|
||||
pusher.connection.bind("pusher:connection_established", connect_handler)
|
||||
pusher.connect()
|
||||
|
||||
return True
|
@ -1,9 +0,0 @@
|
||||
{
|
||||
"domain": "goalfeed",
|
||||
"name": "Goalfeed",
|
||||
"codeowners": [],
|
||||
"documentation": "https://www.home-assistant.io/integrations/goalfeed",
|
||||
"iot_class": "cloud_push",
|
||||
"loggers": ["pysher"],
|
||||
"requirements": ["Pysher==1.0.7"]
|
||||
}
|
@ -2007,12 +2007,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"goalfeed": {
|
||||
"name": "Goalfeed",
|
||||
"integration_type": "hub",
|
||||
"config_flow": false,
|
||||
"iot_class": "cloud_push"
|
||||
},
|
||||
"goalzero": {
|
||||
"name": "Goal Zero Yeti",
|
||||
"integration_type": "device",
|
||||
|
@ -120,9 +120,6 @@ PyViCare==2.25.0
|
||||
# homeassistant.components.xiaomi_aqara
|
||||
PyXiaomiGateway==0.14.3
|
||||
|
||||
# homeassistant.components.goalfeed
|
||||
Pysher==1.0.7
|
||||
|
||||
# homeassistant.components.rachio
|
||||
RachioPy==1.0.3
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user