8000 0.117.1 by balloob · Pull Request #42624 · home-assistant/core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

0.117.1 #42624

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Oct 30, 2020
Merged

0.117.1 #42624

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions homeassistant/components/dsmr/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,16 @@ def state(self):
"""Return the calculated current hourly rate."""
return self._state

@property
def force_update(self):
"""Disable force update."""
return False

@property
def should_poll(self):
"""Enable polling."""
return True

async def async_update(self):
"""Recalculate hourly rate if timestamp has changed.

Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/frontend/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"domain": "frontend",
"name": "Home Assistant Frontend",
"documentation": "https://www.home-assistant.io/integrations/frontend",
"requirements": ["home-assistant-frontend==20201021.3"],
"requirements": ["home-assistant-frontend==20201021.4"],
"dependencies": [
"api",
"auth",
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/gree/manifest.json
8000
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"name": "Gree Climate",
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/gree",
"requirements": ["greeclimate==0.9.0"],
"requirements": ["greeclimate==0.9.2"],
"codeowners": ["@cmroche"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/homekit_controller",
"requirements": [
"aiohomekit==0.2.53"
"aiohomekit==0.2.54"
],
"zeroconf": [
"_hap._tcp.local."
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/mqtt/light/schema_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ def state_received(msg):
except ValueError:
_LOGGER.warning("Invalid color value received")

if self._templates[CONF_COLOR_TEMP_TEMPLATE] is not None:
if self._templates[CONF_WHITE_VALUE_TEMPLATE] is not None:
try:
self._white_value = int(
self._templates[
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/rmvtransport/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,10 +263,10 @@ async def async_update(self):
if not dest_found:
continue

elif self._lines and journey["number"] not in self._lines:
if self._lines and journey["number"] not in self._lines:
continue

elif journey["minutes"] < self._time_offset:
if journey["minutes"] < self._time_offset:
continue

for attr in ["direction", "departure_time", "product", "minutes"]:
Expand Down
1 change: 0 additions & 1 deletion homeassistant/components/synology_dsm/config_flow.py
Original file line number Diff line number Diff line change
2E87 Expand Up @@ -275,7 +275,6 @@ def _login_and_fetch_syno_info(api, otp_code):
if (
not api.information.serial
or api.utilisation.cpu_user_load is None
or not api.storage.disks_ids
or not api.storage.volumes_ids
or not api.network.macs
):
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/tasmota/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "Tasmota (beta)",
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/tasmota",
"requirements": ["hatasmota==0.0.24"],
"requirements": ["hatasmota==0.0.25"],
"dependencies": ["mqtt"],
"mqtt": ["tasmota/discovery/#"],
"codeowners": ["@emontnemery"]
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/const.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Constants used by Home Assistant components."""
MAJOR_VERSION = 0
MINOR_VERSION = 117
PATCH_VERSION = "0"
PATCH_VERSION = "1"
__short_version__ = f"{MAJOR_VERSION}.{MINOR_VERSION}"
__version__ = f"{__short_version__}.{PATCH_VERSION}"
REQUIRED_PYTHON_VER = (3, 7, 1)
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/package_constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ defusedxml==0.6.0
distro==1.5.0
emoji==0.5.4
hass-nabucasa==0.37.1
home-assistant-frontend==20201021.3
home-assistant-frontend==20201021.4
httpx==0.16.1
importlib-metadata==1.6.0;python_version<'3.8'
jinja2>=2.11.2
Expand Down
8 changes: 4 additions & 4 deletions requirements_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ aioguardian==1.0.1
aioharmony==0.2.6

# homeassistant.components.homekit_controller
aiohomekit==0.2.53
aiohomekit==0.2.54

# homeassistant.components.emulated_hue
# homeassistant.components.http
Expand Down Expand Up @@ -696,7 +696,7 @@ gpiozero==1.5.1
gps3==0.33.3

# homeassistant.components.gree
greeclimate==0.9.0
greeclimate==0.9.2

# homeassistant.components.greeneye_monitor
greeneye_monitor==2.1
Expand Down Expand Up @@ -732,7 +732,7 @@ hass-nabucasa==0.37.1
hass_splunk==0.1.1

# homeassistant.components.tasmota
hatasmota==0.0.24
hatasmota==0.0.25

# homeassistant.components.jewish_calendar
hdate==0.9.12
Expand All @@ -759,7 +759,7 @@ hole==0.5.1
holidays==0.10.3

# homeassistant.components.frontend
home-assistant-frontend==20201021.3
home-assistant-frontend==20201021.4

# homeassistant.components.zwave
homeassistant-pyozw==0.1.10
Expand Down
8 changes: 4 additions & 4 deletions requirements_test_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ aioguardian==1.0.1
aioharmony==0.2.6

# homeassistant.components.homekit_controller
aiohomekit==0.2.53
aiohomekit==0.2.54

# homeassistant.components.emulated_hue
# homeassistant.components.http
Expand Down Expand Up @@ -352,7 +352,7 @@ google-cloud-pubsub==0.39.1
google-nest-sdm==0.1.6

# homeassistant.components.gree
greeclimate==0.9.0
greeclimate==0.9.2

# homeassistant.components.griddy
griddypower==0.1.0
Expand All @@ -367,7 +367,7 @@ hangups==0.4.11
hass-nabucasa==0.37.1

# homeassistant.components.tasmota
hatasmota==0.0.24
hatasmota==0.0.25

# homeassistant.components.jewish_calendar
hdate==0.9.12
Expand All @@ -385,7 +385,7 @@ hole==0.5.1
holidays==0.10.3

# homeassistant.components.frontend
home-assistant-frontend==20201021.3
home-assistant-frontend==20201021.4

# homeassistant.components.zwave
homeassistant-pyozw==0.1.10
Expand Down
35 changes: 18 additions & 17 deletions tests/components/config/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,22 +61,23 @@ async def test_websocket_core_update(hass, client):
assert hass.config.external_url != "https://www.example.com"
assert hass.config.internal_url != "http://example.com"

await client.send_json(
{
"id": 5,
"type": "config/core/update",
"latitude": 60,
"longitude": 50,
"elevation": 25,
"location_name": "Huis",
CONF_UNIT_SYSTEM: CONF_UNIT_SYSTEM_IMPERIAL,
"time_zone": "America/New_York",
"external_url": "https://www.example.com",
"internal_url": "http://example.local",
}
)
with patch("homeassistant.util.dt.set_default_time_zone") as mock_set_tz:
await client.send_json(
{
"id": 5,
"type": "config/core/update",
"latitude": 60,
"longitude": 50,
"elevation": 25,
"location_name": "Huis",
CONF_UNIT_SYSTEM: CONF_UNIT_SYSTEM_IMPERIAL,
"time_zone": "America/New_York",
"external_url": "https://www.example.com",
"internal_url": "http://example.local",
}
)

msg = await client.receive_json()
msg = await client.receive_json()

assert msg["id"] == 5
assert msg["type"] == TYPE_RESULT
Expand All @@ -86,11 +87,11 @@ async def test_websocket_core_update(hass, client):
assert hass.config.elevation == 25
assert hass.config.location_name == "Huis"
assert hass.config.units.name == CONF_UNIT_SYSTEM_IMPERIAL
assert hass.config.time_zone.zone == "America/New_York"
assert hass.config.external_url == "https://www.example.com"
assert hass.config.internal_url == "http://example.local"

dt_util.set_default_time_zone(ORIG_TIME_ZONE)
assert len(mock_set_tz.mock_calls) == 1
assert mock_set_tz.mock_calls[0][1][0].zone == "America/New_York"


async def test_websocket_core_update_not_admin(hass, hass_ws_client, hass_admin_user):
Expand Down
3 changes: 2 additions & 1 deletion tests/components/hassio/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,8 @@ async def test_setup_core_push_timezone(hass, aioclient_mock):
assert aioclient_mock.call_count == 7
assert aioclient_mock.mock_calls[2][2]["timezone"] == "testzone"

await hass.config.async_update(time_zone="America/New_York")
with patch("homeassistant.util.dt.set_default_time_zone"):
await hass.config.async_update(time_zone="America/New_York")
await hass.async_block_till_done()
assert aioclient_mock.mock_calls[-1][2]["timezone"] == "America/New_York"

Expand Down
1 change: 0 additions & 1 deletion tests/components/homeassistant/triggers/test_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ async def test_if_fires_using_at_input_datetime(hass, calls, has_date, has_time)
"input_datetime",
{"input_datetime": {"trigger": {"has_date": has_date, "has_time": has_time}}},
)

now = dt_util.now()

trigger_dt = now.replace(
Expand Down
48 changes: 48 additions & 0 deletions tests/components/synology_dsm/test_config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,20 @@ def mock_controller_service_2sa():
yield service_mock


@pytest.fixture(name="service_vdsm")
def mock_controller_service_vdsm():
"""Mock a successful service."""
with patch(
"homeassistant.components.synology_dsm.config_flow.SynologyDSM"
) as service_mock:
service_mock.return_value.information.serial = SERIAL
service_mock.return_value.utilisation.cpu_user_load = 1
service_mock.return_value.storage.disks_ids = []
service_mock.return_value.storage.volumes_ids = ["volume_1"]
service_mock.return_value.network.macs = MACS
yield service_mock


@pytest.fixture(name="service_failed")
def mock_controller_service_failed():
"""Mock a failed service."""
Expand Down Expand Up @@ -196,6 +210,40 @@ async def test_user_2sa(hass: HomeAssistantType, service_2sa: MagicMock):
assert result["data"].get(CONF_VOLUMES) is None


async def test_user_vdsm(hass: HomeAssistantType, service_vdsm: MagicMock):
"""Test user config."""
result = await hass.config_entries.flow.async_init(
DOMAIN, context={"source": SOURCE_USER}, data=None
)
assert result["type"] == data_entry_flow.RESULT_TYPE_FORM
assert result["step_id"] == "user"

# test with all provided
result = await hass.config_entries.flow.async_init(
DOMAIN,
context={"source": SOURCE_USER},
data={
CONF_HOST: HOST,
CONF_PORT: PORT,
CONF_SSL: SSL,
CONF_USERNAME: USERNAME,
CONF_PASSWORD: PASSWORD,
},
)
assert result["type"] == data_entry_flow.RESULT_TYPE_CREATE_ENTRY
assert result["result"].unique_id == SERIAL
assert result["title"] == HOST
assert result["data"][CONF_HOST] == HOST
assert result["data"][CONF_PORT] == PORT
assert result["data"][CONF_SSL] == SSL
assert result["data"][CONF_USERNAME] == USERNAME
assert result["data"][CONF_PASSWORD] == PASSWORD
assert result["data"][CONF_MAC] == MACS
assert result["data"].get("device_token") is None
assert result["data"].get(CONF_DISKS) is None
assert result["data"].get(CONF_VOLUMES) is None


async def test_import(hass: HomeAssistantType, service: MagicMock):
"""Test import step."""
# import with minimum setup
Expand Down
Loading
0