mirror of
https://github.com/home-assistant/core.git
synced 2025-09-21 19:09:35 +00:00
Compare commits
13 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
818b45384d | ||
![]() |
1bbd05dee7 | ||
![]() |
d6f7a984b2 | ||
![]() |
01756011ff | ||
![]() |
d7ad974244 | ||
![]() |
a69938afa2 | ||
![]() |
94c3d9bac0 | ||
![]() |
fb7af0384f | ||
![]() |
5a9a95abe4 | ||
![]() |
e1ad108b6d | ||
![]() |
a76620b76f | ||
![]() |
13fd80affa | ||
![]() |
d576749530 |
@@ -2,7 +2,7 @@
|
||||
"domain": "cloud",
|
||||
"name": "Home Assistant Cloud",
|
||||
"documentation": "https://www.home-assistant.io/integrations/cloud",
|
||||
"requirements": ["hass-nabucasa==0.34.5"],
|
||||
"requirements": ["hass-nabucasa==0.34.6"],
|
||||
"dependencies": ["http", "webhook", "alexa"],
|
||||
"after_dependencies": ["google_assistant"],
|
||||
"codeowners": ["@home-assistant/cloud"]
|
||||
|
@@ -3,6 +3,10 @@
|
||||
"name": "Coronavirus (COVID-19)",
|
||||
"config_flow": true,
|
||||
"documentation": "https://www.home-assistant.io/integrations/coronavirus",
|
||||
"requirements": ["coronavirus==1.1.0"],
|
||||
"codeowners": ["@home_assistant/core"]
|
||||
"requirements": [
|
||||
"coronavirus==1.1.1"
|
||||
],
|
||||
"codeowners": [
|
||||
"@home_assistant/core"
|
||||
]
|
||||
}
|
||||
|
@@ -3,5 +3,5 @@
|
||||
"name": "KEF",
|
||||
"documentation": "https://www.home-assistant.io/integrations/kef",
|
||||
"codeowners": ["@basnijholt"],
|
||||
"requirements": ["aiokef==0.2.9", "getmac==0.8.2"]
|
||||
"requirements": ["aiokef==0.2.10", "getmac==0.8.2"]
|
||||
}
|
||||
|
@@ -356,7 +356,9 @@ async def webhook_enable_encryption(hass, config_entry, data):
|
||||
vol.Required(ATTR_SENSOR_TYPE): vol.In(SENSOR_TYPES),
|
||||
vol.Required(ATTR_SENSOR_UNIQUE_ID): cv.string,
|
||||
vol.Optional(ATTR_SENSOR_UOM): cv.string,
|
||||
vol.Required(ATTR_SENSOR_STATE): vol.Any(None, bool, str, int, float),
|
||||
vol.Optional(ATTR_SENSOR_STATE, default=None): vol.Any(
|
||||
None, bool, str, int, float
|
||||
),
|
||||
vol.Optional(ATTR_SENSOR_ICON, default="mdi:cellphone"): cv.icon,
|
||||
}
|
||||
)
|
||||
|
@@ -210,6 +210,10 @@ class NanoleafLight(LightEntity):
|
||||
self._light.brightness = int(brightness / 2.55)
|
||||
|
||||
if effect:
|
||||
if effect not in self._effects_list:
|
||||
raise ValueError(
|
||||
f"Attempting to apply effect not in the effect list: '{effect}'"
|
||||
)
|
||||
self._light.effect = effect
|
||||
|
||||
def turn_off(self, **kwargs):
|
||||
@@ -227,8 +231,13 @@ class NanoleafLight(LightEntity):
|
||||
self._available = self._light.available
|
||||
self._brightness = self._light.brightness
|
||||
self._color_temp = self._light.color_temperature
|
||||
self._effect = self._light.effect
|
||||
self._effects_list = self._light.effects
|
||||
# Nanoleaf api returns non-existent effect named "*Solid*" when light set to solid color.
|
||||
# This causes various issues with scening (see https://github.com/home-assistant/core/issues/36359).
|
||||
# Until fixed at the library level, we should ensure the effect exists before saving to light properties
|
||||
self._effect = (
|
||||
self._light.effect if self._light.effect in self._effects_list else None
|
||||
)
|
||||
self._hs_color = self._light.hue, self._light.saturation
|
||||
self._state = self._light.on
|
||||
except Unavailable as err:
|
||||
|
@@ -8,7 +8,7 @@
|
||||
},
|
||||
"abort": { "one_instance_allowed": "Only a single instance is necessary." },
|
||||
"create_entry": {
|
||||
"default": "\n\nOn Android, open [the OwnTracks app]({android_url}), go to preferences -> connection. Change the following settings:\n - Mode: Private HTTP\n - Host: {webhook_url}\n - Identification:\n - Username: `<Your name>`\n - Device ID: `<Your device name>`\n\nOn iOS, open [the OwnTracks app]({ios_url}), tap (i) icon in top left -> settings. Change the following settings:\n - Mode: HTTP\n - URL: {webhook_url}\n - Turn on authentication\n - UserID: `<Your name>`\n\n{secret}\n\nSee [the documentation]({docs_url}) for more information."
|
||||
"default": "\n\nOn Android, open [the OwnTracks app]({android_url}), go to preferences -> connection. Change the following settings:\n - Mode: Private HTTP\n - Host: {webhook_url}\n - Identification:\n - Username: `'<Your name>'`\n - Device ID: `'<Your device name>'`\n\nOn iOS, open [the OwnTracks app]({ios_url}), tap (i) icon in top left -> settings. Change the following settings:\n - Mode: HTTP\n - URL: {webhook_url}\n - Turn on authentication\n - UserID: `'<Your name>'`\n\n{secret}\n\nSee [the documentation]({docs_url}) for more information."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -161,7 +161,7 @@ def load_games(hass: HomeAssistantType, unique_id: str) -> dict:
|
||||
"""Load games for sources."""
|
||||
g_file = hass.config.path(GAMES_FILE.format(unique_id))
|
||||
try:
|
||||
games = load_json(g_file, dict)
|
||||
games = load_json(g_file)
|
||||
except HomeAssistantError as error:
|
||||
games = {}
|
||||
_LOGGER.error("Failed to load games file: %s", error)
|
||||
|
@@ -1,7 +1,7 @@
|
||||
"""Constants used by Home Assistant components."""
|
||||
MAJOR_VERSION = 0
|
||||
MINOR_VERSION = 111
|
||||
PATCH_VERSION = "0b4"
|
||||
PATCH_VERSION = "0"
|
||||
__short_version__ = f"{MAJOR_VERSION}.{MINOR_VERSION}"
|
||||
__version__ = f"{__short_version__}.{PATCH_VERSION}"
|
||||
REQUIRED_PYTHON_VER = (3, 7, 0)
|
||||
|
@@ -11,7 +11,7 @@ ciso8601==2.1.3
|
||||
cryptography==2.9.2
|
||||
defusedxml==0.6.0
|
||||
distro==1.5.0
|
||||
hass-nabucasa==0.34.5
|
||||
hass-nabucasa==0.34.6
|
||||
home-assistant-frontend==20200603.2
|
||||
importlib-metadata==1.6.0
|
||||
jinja2>=2.11.1
|
||||
|
@@ -197,7 +197,7 @@ aioimaplib==0.7.15
|
||||
aiokafka==0.5.1
|
||||
|
||||
# homeassistant.components.kef
|
||||
aiokef==0.2.9
|
||||
aiokef==0.2.10
|
||||
|
||||
# homeassistant.components.lifx
|
||||
aiolifx==0.6.7
|
||||
@@ -442,7 +442,7 @@ connect-box==0.2.5
|
||||
construct==2.9.45
|
||||
|
||||
# homeassistant.components.coronavirus
|
||||
coronavirus==1.1.0
|
||||
coronavirus==1.1.1
|
||||
|
||||
# homeassistant.scripts.credstash
|
||||
# credstash==1.15.0
|
||||
@@ -704,7 +704,7 @@ habitipy==0.2.0
|
||||
hangups==0.4.9
|
||||
|
||||
# homeassistant.components.cloud
|
||||
hass-nabucasa==0.34.5
|
||||
hass-nabucasa==0.34.6
|
||||
|
||||
# homeassistant.components.mqtt
|
||||
hbmqtt==0.9.5
|
||||
|
@@ -191,7 +191,7 @@ colorlog==4.1.0
|
||||
construct==2.9.45
|
||||
|
||||
# homeassistant.components.coronavirus
|
||||
coronavirus==1.1.0
|
||||
coronavirus==1.1.1
|
||||
|
||||
# homeassistant.scripts.credstash
|
||||
# credstash==1.15.0
|
||||
@@ -303,7 +303,7 @@ ha-ffmpeg==2.0
|
||||
hangups==0.4.9
|
||||
|
||||
# homeassistant.components.cloud
|
||||
hass-nabucasa==0.34.5
|
||||
hass-nabucasa==0.34.6
|
||||
|
||||
# homeassistant.components.mqtt
|
||||
hbmqtt==0.9.5
|
||||
|
@@ -188,6 +188,31 @@ async def test_register_sensor_no_state(hass, create_registrations, webhook_clie
|
||||
assert entity.name == "Test 1 Battery State"
|
||||
assert entity.state == STATE_UNKNOWN
|
||||
|
||||
reg_resp = await webhook_client.post(
|
||||
webhook_url,
|
||||
json={
|
||||
"type": "register_sensor",
|
||||
"data": {
|
||||
"name": "Backup Battery State",
|
||||
"type": "sensor",
|
||||
"unique_id": "backup_battery_state",
|
||||
},
|
||||
},
|
||||
)
|
||||
|
||||
assert reg_resp.status == 201
|
||||
|
||||
json = await reg_resp.json()
|
||||
assert json == {"success": True}
|
||||
await hass.async_block_till_done()
|
||||
|
||||
entity = hass.states.get("sensor.test_1_backup_battery_state")
|
||||
assert entity
|
||||
|
||||
assert entity.domain == "sensor"
|
||||
assert entity.name == "Test 1 Backup Battery State"
|
||||
assert entity.state == STATE_UNKNOWN
|
||||
|
||||
|
||||
async def test_update_sensor_no_state(hass, create_registrations, webhook_client):
|
||||
"""Test that sensors can be updated, when there is no (unknown) state."""
|
||||
|
Reference in New Issue
Block a user