mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 04:07:08 +00:00
commit
09f7a09ce7
@ -43,7 +43,7 @@ stages:
|
|||||||
release="$(Build.SourceBranchName)"
|
release="$(Build.SourceBranchName)"
|
||||||
created_by="$(curl -s https://api.github.com/repos/home-assistant/home-assistant/releases/tags/${release} | jq --raw-output '.author.login')"
|
created_by="$(curl -s https://api.github.com/repos/home-assistant/home-assistant/releases/tags/${release} | jq --raw-output '.author.login')"
|
||||||
|
|
||||||
if [[ "${created_by}" =~ ^(balloob|pvizeli|fabaff|robbiet480|bramkragten)$ ]]; then
|
if [[ "${created_by}" =~ ^(balloob|pvizeli|fabaff|robbiet480|bramkragten|frenck)$ ]]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@ from homeassistant.helpers.event import async_call_later
|
|||||||
from .config_flow import configured_instances
|
from .config_flow import configured_instances
|
||||||
from .const import (
|
from .const import (
|
||||||
ATTR_LAST_DATA,
|
ATTR_LAST_DATA,
|
||||||
|
ATTR_MONITORED_CONDITIONS,
|
||||||
CONF_APP_KEY,
|
CONF_APP_KEY,
|
||||||
DATA_CLIENT,
|
DATA_CLIENT,
|
||||||
DOMAIN,
|
DOMAIN,
|
||||||
@ -341,7 +342,6 @@ class AmbientStation:
|
|||||||
self._watchdog_listener = None
|
self._watchdog_listener = None
|
||||||
self._ws_reconnect_delay = DEFAULT_SOCKET_MIN_RETRY
|
self._ws_reconnect_delay = DEFAULT_SOCKET_MIN_RETRY
|
||||||
self.client = client
|
self.client = client
|
||||||
self.monitored_conditions = []
|
|
||||||
self.stations = {}
|
self.stations = {}
|
||||||
|
|
||||||
async def _attempt_connect(self):
|
async def _attempt_connect(self):
|
||||||
@ -398,19 +398,19 @@ class AmbientStation:
|
|||||||
|
|
||||||
_LOGGER.debug("New station subscription: %s", data)
|
_LOGGER.debug("New station subscription: %s", data)
|
||||||
|
|
||||||
self.monitored_conditions = [
|
# Only create entities based on the data coming through the socket.
|
||||||
|
# If the user is monitoring brightness (in W/m^2), make sure we also
|
||||||
|
# add a calculated sensor for the same data measured in lx:
|
||||||
|
monitored_conditions = [
|
||||||
k for k in station["lastData"] if k in SENSOR_TYPES
|
k for k in station["lastData"] if k in SENSOR_TYPES
|
||||||
]
|
]
|
||||||
|
if TYPE_SOLARRADIATION in monitored_conditions:
|
||||||
# If the user is monitoring brightness (in W/m^2),
|
monitored_conditions.append(TYPE_SOLARRADIATION_LX)
|
||||||
# make sure we also add a calculated sensor for the
|
|
||||||
# same data measured in lx:
|
|
||||||
if TYPE_SOLARRADIATION in self.monitored_conditions:
|
|
||||||
self.monitored_conditions.append(TYPE_SOLARRADIATION_LX)
|
|
||||||
|
|
||||||
self.stations[station["macAddress"]] = {
|
self.stations[station["macAddress"]] = {
|
||||||
ATTR_LAST_DATA: station["lastData"],
|
ATTR_LAST_DATA: station["lastData"],
|
||||||
ATTR_LOCATION: station.get("info", {}).get("location"),
|
ATTR_LOCATION: station.get("info", {}).get("location"),
|
||||||
|
ATTR_MONITORED_CONDITIONS: monitored_conditions,
|
||||||
ATTR_NAME: station.get("info", {}).get(
|
ATTR_NAME: station.get("info", {}).get(
|
||||||
"name", station["macAddress"]
|
"name", station["macAddress"]
|
||||||
),
|
),
|
||||||
|
@ -19,7 +19,13 @@ from . import (
|
|||||||
TYPE_BATTOUT,
|
TYPE_BATTOUT,
|
||||||
AmbientWeatherEntity,
|
AmbientWeatherEntity,
|
||||||
)
|
)
|
||||||
from .const import ATTR_LAST_DATA, DATA_CLIENT, DOMAIN, TYPE_BINARY_SENSOR
|
from .const import (
|
||||||
|
ATTR_LAST_DATA,
|
||||||
|
ATTR_MONITORED_CONDITIONS,
|
||||||
|
DATA_CLIENT,
|
||||||
|
DOMAIN,
|
||||||
|
TYPE_BINARY_SENSOR,
|
||||||
|
)
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -35,7 +41,7 @@ async def async_setup_entry(hass, entry, async_add_entities):
|
|||||||
|
|
||||||
binary_sensor_list = []
|
binary_sensor_list = []
|
||||||
for mac_address, station in ambient.stations.items():
|
for mac_address, station in ambient.stations.items():
|
||||||
for condition in ambient.monitored_conditions:
|
for condition in station[ATTR_MONITORED_CONDITIONS]:
|
||||||
name, _, kind, device_class = SENSOR_TYPES[condition]
|
name, _, kind, device_class = SENSOR_TYPES[condition]
|
||||||
if kind == TYPE_BINARY_SENSOR:
|
if kind == TYPE_BINARY_SENSOR:
|
||||||
binary_sensor_list.append(
|
binary_sensor_list.append(
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
DOMAIN = "ambient_station"
|
DOMAIN = "ambient_station"
|
||||||
|
|
||||||
ATTR_LAST_DATA = "last_data"
|
ATTR_LAST_DATA = "last_data"
|
||||||
|
ATTR_MONITORED_CONDITIONS = "monitored_conditions"
|
||||||
|
|
||||||
CONF_APP_KEY = "app_key"
|
CONF_APP_KEY = "app_key"
|
||||||
|
|
||||||
|
@ -9,7 +9,13 @@ from . import (
|
|||||||
TYPE_SOLARRADIATION_LX,
|
TYPE_SOLARRADIATION_LX,
|
||||||
AmbientWeatherEntity,
|
AmbientWeatherEntity,
|
||||||
)
|
)
|
||||||
from .const import ATTR_LAST_DATA, DATA_CLIENT, DOMAIN, TYPE_SENSOR
|
from .const import (
|
||||||
|
ATTR_LAST_DATA,
|
||||||
|
ATTR_MONITORED_CONDITIONS,
|
||||||
|
DATA_CLIENT,
|
||||||
|
DOMAIN,
|
||||||
|
TYPE_SENSOR,
|
||||||
|
)
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -25,7 +31,7 @@ async def async_setup_entry(hass, entry, async_add_entities):
|
|||||||
|
|
||||||
sensor_list = []
|
sensor_list = []
|
||||||
for mac_address, station in ambient.stations.items():
|
for mac_address, station in ambient.stations.items():
|
||||||
for condition in ambient.monitored_conditions:
|
for condition in station[ATTR_MONITORED_CONDITIONS]:
|
||||||
name, unit, kind, device_class = SENSOR_TYPES[condition]
|
name, unit, kind, device_class = SENSOR_TYPES[condition]
|
||||||
if kind == TYPE_SENSOR:
|
if kind == TYPE_SENSOR:
|
||||||
sensor_list.append(
|
sensor_list.append(
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"name": "Emulated Roku",
|
"name": "Emulated Roku",
|
||||||
"config_flow": true,
|
"config_flow": true,
|
||||||
"documentation": "https://www.home-assistant.io/integrations/emulated_roku",
|
"documentation": "https://www.home-assistant.io/integrations/emulated_roku",
|
||||||
"requirements": ["emulated_roku==0.1.8"],
|
"requirements": ["emulated_roku==0.1.9"],
|
||||||
"dependencies": [],
|
"dependencies": [],
|
||||||
"codeowners": []
|
"codeowners": []
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,11 @@ CONFIG_SCHEMA = vol.Schema(
|
|||||||
DOMAIN: vol.Schema(
|
DOMAIN: vol.Schema(
|
||||||
{
|
{
|
||||||
vol.Optional(CONF_BRIDGES): vol.All(
|
vol.Optional(CONF_BRIDGES): vol.All(
|
||||||
cv.ensure_list, [BRIDGE_CONFIG_SCHEMA]
|
cv.ensure_list,
|
||||||
|
[
|
||||||
|
cv.deprecated("filename", invalidation_version="0.106.0"),
|
||||||
|
vol.All(BRIDGE_CONFIG_SCHEMA),
|
||||||
|
],
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@ -69,7 +73,7 @@ async def async_setup(hass, config):
|
|||||||
bridges = conf[CONF_BRIDGES]
|
bridges = conf[CONF_BRIDGES]
|
||||||
|
|
||||||
configured_hosts = set(
|
configured_hosts = set(
|
||||||
entry.data["host"] for entry in hass.config_entries.async_entries(DOMAIN)
|
entry.data.get("host") for entry in hass.config_entries.async_entries(DOMAIN)
|
||||||
)
|
)
|
||||||
|
|
||||||
for bridge_conf in bridges:
|
for bridge_conf in bridges:
|
||||||
|
@ -297,6 +297,7 @@ class IcloudAccount:
|
|||||||
self._owner_fullname = f"{user_info['firstName']} {user_info['lastName']}"
|
self._owner_fullname = f"{user_info['firstName']} {user_info['lastName']}"
|
||||||
|
|
||||||
self._family_members_fullname = {}
|
self._family_members_fullname = {}
|
||||||
|
if user_info.get("membersInfo") is not None:
|
||||||
for prs_id, member in user_info["membersInfo"].items():
|
for prs_id, member in user_info["membersInfo"].items():
|
||||||
self._family_members_fullname[
|
self._family_members_fullname[
|
||||||
prs_id
|
prs_id
|
||||||
|
@ -167,7 +167,7 @@ class MikrotikClient:
|
|||||||
|
|
||||||
def get_hostname(self):
|
def get_hostname(self):
|
||||||
"""Return device host name."""
|
"""Return device host name."""
|
||||||
data = self.command(MIKROTIK_SERVICES[IDENTITY])
|
data = list(self.command(MIKROTIK_SERVICES[IDENTITY]))
|
||||||
return data[0][NAME] if data else None
|
return data[0][NAME] if data else None
|
||||||
|
|
||||||
def connected(self):
|
def connected(self):
|
||||||
|
@ -133,8 +133,8 @@ class MpdDevice(MediaPlayerDevice):
|
|||||||
self._status = self._client.status()
|
self._status = self._client.status()
|
||||||
self._currentsong = self._client.currentsong()
|
self._currentsong = self._client.currentsong()
|
||||||
|
|
||||||
position = self._status["time"]
|
position = self._status.get("time")
|
||||||
if self._media_position != position:
|
if position is not None and self._media_position != position:
|
||||||
self._media_position_updated_at = dt_util.utcnow()
|
self._media_position_updated_at = dt_util.utcnow()
|
||||||
self._media_position = position
|
self._media_position = position
|
||||||
|
|
||||||
|
@ -39,16 +39,18 @@ class MSTeamsNotificationService(BaseNotificationService):
|
|||||||
def __init__(self, webhook_url):
|
def __init__(self, webhook_url):
|
||||||
"""Initialize the service."""
|
"""Initialize the service."""
|
||||||
self._webhook_url = webhook_url
|
self._webhook_url = webhook_url
|
||||||
self.teams_message = pymsteams.connectorcard(self._webhook_url)
|
|
||||||
|
|
||||||
def send_message(self, message=None, **kwargs):
|
def send_message(self, message=None, **kwargs):
|
||||||
"""Send a message to the webhook."""
|
"""Send a message to the webhook."""
|
||||||
|
|
||||||
|
teams_message = pymsteams.connectorcard(self._webhook_url)
|
||||||
|
|
||||||
title = kwargs.get(ATTR_TITLE, ATTR_TITLE_DEFAULT)
|
title = kwargs.get(ATTR_TITLE, ATTR_TITLE_DEFAULT)
|
||||||
data = kwargs.get(ATTR_DATA)
|
data = kwargs.get(ATTR_DATA)
|
||||||
|
|
||||||
self.teams_message.title(title)
|
teams_message.title(title)
|
||||||
|
|
||||||
self.teams_message.text(message)
|
teams_message.text(message)
|
||||||
|
|
||||||
if data is not None:
|
if data is not None:
|
||||||
file_url = data.get(ATTR_FILE_URL)
|
file_url = data.get(ATTR_FILE_URL)
|
||||||
@ -60,8 +62,8 @@ class MSTeamsNotificationService(BaseNotificationService):
|
|||||||
|
|
||||||
message_section = pymsteams.cardsection()
|
message_section = pymsteams.cardsection()
|
||||||
message_section.addImage(file_url)
|
message_section.addImage(file_url)
|
||||||
self.teams_message.addSection(message_section)
|
teams_message.addSection(message_section)
|
||||||
try:
|
try:
|
||||||
self.teams_message.send()
|
teams_message.send()
|
||||||
except RuntimeError as err:
|
except RuntimeError as err:
|
||||||
_LOGGER.error("Could not send notification. Error: %s", err)
|
_LOGGER.error("Could not send notification. Error: %s", err)
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"domain": "webostv",
|
"domain": "webostv",
|
||||||
"name": "LG webOS Smart TV",
|
"name": "LG webOS Smart TV",
|
||||||
"documentation": "https://www.home-assistant.io/integrations/webostv",
|
"documentation": "https://www.home-assistant.io/integrations/webostv",
|
||||||
"requirements": ["aiopylgtv==0.2.6"],
|
"requirements": ["aiopylgtv==0.2.7"],
|
||||||
"dependencies": ["configurator"],
|
"dependencies": ["configurator"],
|
||||||
"codeowners": ["@bendavid"]
|
"codeowners": ["@bendavid"]
|
||||||
}
|
}
|
||||||
|
@ -351,7 +351,7 @@ class LgWebOSMediaPlayerEntity(MediaPlayerDevice):
|
|||||||
partial_match_channel_id = None
|
partial_match_channel_id = None
|
||||||
perfect_match_channel_id = None
|
perfect_match_channel_id = None
|
||||||
|
|
||||||
for channel in self._client.get_channels():
|
for channel in await self._client.get_channels():
|
||||||
if media_id == channel["channelNumber"]:
|
if media_id == channel["channelNumber"]:
|
||||||
perfect_match_channel_id = channel["channelId"]
|
perfect_match_channel_id = channel["channelId"]
|
||||||
continue
|
continue
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
"""Constants used by Home Assistant components."""
|
"""Constants used by Home Assistant components."""
|
||||||
MAJOR_VERSION = 0
|
MAJOR_VERSION = 0
|
||||||
MINOR_VERSION = 104
|
MINOR_VERSION = 104
|
||||||
PATCH_VERSION = "0"
|
PATCH_VERSION = "1"
|
||||||
__short_version__ = f"{MAJOR_VERSION}.{MINOR_VERSION}"
|
__short_version__ = f"{MAJOR_VERSION}.{MINOR_VERSION}"
|
||||||
__version__ = f"{__short_version__}.{PATCH_VERSION}"
|
__version__ = f"{__short_version__}.{PATCH_VERSION}"
|
||||||
REQUIRED_PYTHON_VER = (3, 7, 0)
|
REQUIRED_PYTHON_VER = (3, 7, 0)
|
||||||
|
@ -190,7 +190,7 @@ aionotion==1.1.0
|
|||||||
aiopvapi==1.6.14
|
aiopvapi==1.6.14
|
||||||
|
|
||||||
# homeassistant.components.webostv
|
# homeassistant.components.webostv
|
||||||
aiopylgtv==0.2.6
|
aiopylgtv==0.2.7
|
||||||
|
|
||||||
# homeassistant.components.switcher_kis
|
# homeassistant.components.switcher_kis
|
||||||
aioswitcher==2019.4.26
|
aioswitcher==2019.4.26
|
||||||
@ -477,7 +477,7 @@ eliqonline==1.2.2
|
|||||||
elkm1-lib==0.7.15
|
elkm1-lib==0.7.15
|
||||||
|
|
||||||
# homeassistant.components.emulated_roku
|
# homeassistant.components.emulated_roku
|
||||||
emulated_roku==0.1.8
|
emulated_roku==0.1.9
|
||||||
|
|
||||||
# homeassistant.components.enocean
|
# homeassistant.components.enocean
|
||||||
enocean==0.50
|
enocean==0.50
|
||||||
|
@ -69,7 +69,7 @@ aiohue==1.10.1
|
|||||||
aionotion==1.1.0
|
aionotion==1.1.0
|
||||||
|
|
||||||
# homeassistant.components.webostv
|
# homeassistant.components.webostv
|
||||||
aiopylgtv==0.2.6
|
aiopylgtv==0.2.7
|
||||||
|
|
||||||
# homeassistant.components.switcher_kis
|
# homeassistant.components.switcher_kis
|
||||||
aioswitcher==2019.4.26
|
aioswitcher==2019.4.26
|
||||||
@ -171,7 +171,7 @@ eebrightbox==0.0.4
|
|||||||
elgato==0.2.0
|
elgato==0.2.0
|
||||||
|
|
||||||
# homeassistant.components.emulated_roku
|
# homeassistant.components.emulated_roku
|
||||||
emulated_roku==0.1.8
|
emulated_roku==0.1.9
|
||||||
|
|
||||||
# homeassistant.components.season
|
# homeassistant.components.season
|
||||||
ephem==3.7.7.0
|
ephem==3.7.7.0
|
||||||
|
@ -33,6 +33,7 @@ async def test_setup_defined_hosts_known_auth(hass):
|
|||||||
hue.CONF_HOST: "0.0.0.0",
|
hue.CONF_HOST: "0.0.0.0",
|
||||||
hue.CONF_ALLOW_HUE_GROUPS: False,
|
hue.CONF_ALLOW_HUE_GROUPS: False,
|
||||||
hue.CONF_ALLOW_UNREACHABLE: True,
|
hue.CONF_ALLOW_UNREACHABLE: True,
|
||||||
|
"filename": "bla",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -49,6 +50,7 @@ async def test_setup_defined_hosts_known_auth(hass):
|
|||||||
hue.CONF_HOST: "0.0.0.0",
|
hue.CONF_HOST: "0.0.0.0",
|
||||||
hue.CONF_ALLOW_HUE_GROUPS: False,
|
hue.CONF_ALLOW_HUE_GROUPS: False,
|
||||||
hue.CONF_ALLOW_UNREACHABLE: True,
|
hue.CONF_ALLOW_UNREACHABLE: True,
|
||||||
|
"filename": "bla",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user