Skip to content

Commit

Permalink
2022.10.3 (home-assistant#80054)
Browse files Browse the repository at this point in the history
  • Loading branch information
frenck authored Oct 10, 2022
2 parents 0bca322 + d969bb3 commit 1c74279
Show file tree
Hide file tree
Showing 19 changed files with 79 additions and 46 deletions.
2 changes: 1 addition & 1 deletion homeassistant/components/bluetooth/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"bleak==0.18.1",
"bleak-retry-connector==2.1.3",
"bluetooth-adapters==0.6.0",
"bluetooth-auto-recovery==0.3.3",
"bluetooth-auto-recovery==0.3.4",
"dbus-fast==1.24.0"
],
"codeowners": ["@bdraco"],
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/fibaro/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -650,8 +650,8 @@ def extra_state_attributes(self):
attr[ATTR_BATTERY_LEVEL] = int(
self.fibaro_device.properties.batteryLevel
)
if "fibaroAlarmArm" in self.fibaro_device.interfaces:
attr[ATTR_ARMED] = bool(self.fibaro_device.properties.armed)
if "armed" in self.fibaro_device.properties:
attr[ATTR_ARMED] = self.fibaro_device.properties.armed.lower() == "true"
except (ValueError, KeyError):
pass

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==20221006.0"],
"requirements": ["home-assistant-frontend==20221010.0"],
"dependencies": [
"api",
"auth",
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/gtfs/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"domain": "gtfs",
"name": "General Transit Feed Specification (GTFS)",
"documentation": "https://www.home-assistant.io/integrations/gtfs",
"requirements": ["pygtfs==0.1.6"],
"requirements": ["pygtfs==0.1.7"],
"codeowners": [],
"iot_class": "local_polling",
"loggers": ["pygtfs"]
Expand Down
3 changes: 1 addition & 2 deletions homeassistant/components/hassio/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@
"after_dependencies": ["panel_custom"],
"codeowners": ["@home-assistant/supervisor"],
"iot_class": "local_polling",
"quality_scale": "internal",
"integration_type": "system"
"quality_scale": "internal"
}
2 changes: 1 addition & 1 deletion homeassistant/components/hive/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"models": ["HHKBridge*"]
},
"documentation": "https://www.home-assistant.io/integrations/hive",
"requirements": ["pyhiveapi==0.5.13"],
"requirements": ["pyhiveapi==0.5.14"],
"codeowners": ["@Rendili", "@KJonline"],
"iot_class": "cloud_polling",
"loggers": ["apyhiveapi"]
Expand Down
8 changes: 8 additions & 0 deletions homeassistant/components/homekit_controller/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,14 @@ def hvac_action(self) -> HVACAction | None:
# This characteristic describes the current mode of a device,
# e.g. a thermostat is "heating" a room to 75 degrees Fahrenheit.
# Can be 0 - 2 (Off, Heat, Cool)

# If the HVAC is switched off, it must be idle
# This works around a bug in some devices (like Eve radiator valves) that
# return they are heating when they are not.
target = self.service.value(CharacteristicsTypes.HEATING_COOLING_TARGET)
if target == HeatingCoolingTargetValues.OFF:
return HVACAction.IDLE

value = self.service.value(CharacteristicsTypes.HEATING_COOLING_CURRENT)
return CURRENT_MODE_HOMEKIT_TO_HASS.get(value)

Expand Down
8 changes: 4 additions & 4 deletions homeassistant/components/netatmo/device_trigger.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@
CONF_SUBTYPE = "subtype"

DEVICES = {
"NACamera": INDOOR_CAMERA_TRIGGERS,
"NOC": OUTDOOR_CAMERA_TRIGGERS,
"NATherm1": CLIMATE_TRIGGERS,
"NRV": CLIMATE_TRIGGERS,
"Smart Indoor Camera": INDOOR_CAMERA_TRIGGERS,
"Smart Outdoor Camera": OUTDOOR_CAMERA_TRIGGERS,
"Smart Thermostat": CLIMATE_TRIGGERS,
"Smart Valve": CLIMATE_TRIGGERS,
}

SUBTYPES = {
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/switchbot/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"domain": "switchbot",
"name": "SwitchBot",
"documentation": "https://www.home-assistant.io/integrations/switchbot",
"requirements": ["PySwitchbot==0.19.13"],
"requirements": ["PySwitchbot==0.19.15"],
"config_flow": true,
"dependencies": ["bluetooth"],
"codeowners": [
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/unifi/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "UniFi Network",
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/unifi",
"requirements": ["aiounifi==38"],
"requirements": ["aiounifi==39"],
"codeowners": ["@Kane610"],
"quality_scale": "platinum",
"ssdp": [
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/zha/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"zha-quirks==0.0.82",
"zigpy-deconz==0.19.0",
"zigpy==0.51.3",
"zigpy-xbee==0.16.1",
"zigpy-zigate==0.10.1",
"zigpy-xbee==0.16.2",
"zigpy-zigate==0.10.2",
"zigpy-znp==0.9.1"
],
"usb": [
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
APPLICATION_NAME: Final = "HomeAssistant"
MAJOR_VERSION: Final = 2022
MINOR_VERSION: Final = 10
PATCH_VERSION: Final = "2"
PATCH_VERSION: Final = "3"
__short_version__: Final = f"{MAJOR_VERSION}.{MINOR_VERSION}"
__version__: Final = f"{__short_version__}.{PATCH_VERSION}"
REQUIRED_PYTHON_VER: Final[tuple[int, int, int]] = (3, 9, 0)
Expand Down
5 changes: 5 additions & 0 deletions homeassistant/generated/integrations.json
Original file line number Diff line number Diff line change
Expand Up @@ -1690,6 +1690,11 @@
"iot_class": "local_polling",
"name": "Harman Kardon AVR"
},
"hassio": {
"config_flow": false,
"iot_class": "local_polling",
"name": "Home Assistant Supervisor"
},
"haveibeenpwned": {
"config_flow": false,
"iot_class": "cloud_polling",
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/package_constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ bcrypt==3.1.7
bleak-retry-connector==2.1.3
bleak==0.18.1
bluetooth-adapters==0.6.0
bluetooth-auto-recovery==0.3.3
bluetooth-auto-recovery==0.3.4
certifi>=2021.5.30
ciso8601==2.2.0
cryptography==38.0.1
dbus-fast==1.24.0
fnvhash==0.1.0
hass-nabucasa==0.56.0
home-assistant-bluetooth==1.3.0
home-assistant-frontend==20221006.0
home-assistant-frontend==20221010.0
httpx==0.23.0
ifaddr==0.1.7
jinja2==3.1.2
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "homeassistant"
version = "2022.10.2"
version = "2022.10.3"
license = {text = "Apache-2.0"}
description = "Open-source home automation platform running on Python 3."
readme = "README.rst"
Expand Down
16 changes: 8 additions & 8 deletions requirements_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ PyRMVtransport==0.3.3
PySocks==1.7.1

# homeassistant.components.switchbot
PySwitchbot==0.19.13
PySwitchbot==0.19.15

# homeassistant.components.transport_nsw
PyTransportNSW==0.1.1
Expand Down Expand Up @@ -276,7 +276,7 @@ aiosyncthing==0.5.1
aiotractive==0.5.4

# homeassistant.components.unifi
aiounifi==38
aiounifi==39

# homeassistant.components.vlc_telnet
aiovlc==0.1.0
Expand Down Expand Up @@ -438,7 +438,7 @@ bluemaestro-ble==0.2.0
bluetooth-adapters==0.6.0

# homeassistant.components.bluetooth
bluetooth-auto-recovery==0.3.3
bluetooth-auto-recovery==0.3.4

# homeassistant.components.bond
bond-async==0.1.22
Expand Down Expand Up @@ -865,7 +865,7 @@ hole==0.7.0
holidays==0.16

# homeassistant.components.frontend
home-assistant-frontend==20221006.0
home-assistant-frontend==20221010.0

# homeassistant.components.home_connect
homeconnect==0.7.2
Expand Down Expand Up @@ -1586,7 +1586,7 @@ pyfttt==0.3
pygatt[GATTTOOL]==4.0.5

# homeassistant.components.gtfs
pygtfs==0.1.6
pygtfs==0.1.7

# homeassistant.components.hvv_departures
pygti==0.9.3
Expand All @@ -1601,7 +1601,7 @@ pyheos==0.7.2
pyhik==0.3.0

# homeassistant.components.hive
pyhiveapi==0.5.13
pyhiveapi==0.5.14

# homeassistant.components.homematic
pyhomematic==0.1.77
Expand Down Expand Up @@ -2604,10 +2604,10 @@ ziggo-mediabox-xl==1.1.0
zigpy-deconz==0.19.0

# homeassistant.components.zha
zigpy-xbee==0.16.1
zigpy-xbee==0.16.2

# homeassistant.components.zha
zigpy-zigate==0.10.1
zigpy-zigate==0.10.2

# homeassistant.components.zha
zigpy-znp==0.9.1
Expand Down
14 changes: 7 additions & 7 deletions requirements_test_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ PyRMVtransport==0.3.3
PySocks==1.7.1

# homeassistant.components.switchbot
PySwitchbot==0.19.13
PySwitchbot==0.19.15

# homeassistant.components.transport_nsw
PyTransportNSW==0.1.1
Expand Down Expand Up @@ -251,7 +251,7 @@ aiosyncthing==0.5.1
aiotractive==0.5.4

# homeassistant.components.unifi
aiounifi==38
aiounifi==39

# homeassistant.components.vlc_telnet
aiovlc==0.1.0
Expand Down Expand Up @@ -352,7 +352,7 @@ bluemaestro-ble==0.2.0
bluetooth-adapters==0.6.0

# homeassistant.components.bluetooth
bluetooth-auto-recovery==0.3.3
bluetooth-auto-recovery==0.3.4

# homeassistant.components.bond
bond-async==0.1.22
Expand Down Expand Up @@ -645,7 +645,7 @@ hole==0.7.0
holidays==0.16

# homeassistant.components.frontend
home-assistant-frontend==20221006.0
home-assistant-frontend==20221010.0

# homeassistant.components.home_connect
homeconnect==0.7.2
Expand Down Expand Up @@ -1123,7 +1123,7 @@ pyhaversion==22.8.0
pyheos==0.7.2

# homeassistant.components.hive
pyhiveapi==0.5.13
pyhiveapi==0.5.14

# homeassistant.components.homematic
pyhomematic==0.1.77
Expand Down Expand Up @@ -1799,10 +1799,10 @@ zha-quirks==0.0.82
zigpy-deconz==0.19.0

# homeassistant.components.zha
zigpy-xbee==0.16.1
zigpy-xbee==0.16.2

# homeassistant.components.zha
zigpy-zigate==0.10.1
zigpy-zigate==0.10.2

# homeassistant.components.zha
zigpy-znp==0.9.1
Expand Down
21 changes: 21 additions & 0 deletions tests/components/homekit_controller/test_climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,27 @@ async def test_hvac_mode_vs_hvac_action(hass, utcnow):
assert state.attributes["hvac_action"] == "heating"


async def test_hvac_mode_vs_hvac_action_current_mode_wrong(hass, utcnow):
"""Check that we cope with buggy HEATING_COOLING_CURRENT."""
helper = await setup_test_component(hass, create_thermostat_service)

await helper.async_update(
ServicesTypes.THERMOSTAT,
{
CharacteristicsTypes.TEMPERATURE_CURRENT: 22,
CharacteristicsTypes.TEMPERATURE_TARGET: 21,
CharacteristicsTypes.HEATING_COOLING_CURRENT: 1,
CharacteristicsTypes.HEATING_COOLING_TARGET: 0,
CharacteristicsTypes.RELATIVE_HUMIDITY_CURRENT: 50,
CharacteristicsTypes.RELATIVE_HUMIDITY_TARGET: 45,
},
)

state = await helper.poll_and_get_state()
assert state.state == "off"
assert state.attributes["hvac_action"] == "idle"


def create_heater_cooler_service(accessory):
"""Define thermostat characteristics."""
service = accessory.add_service(ServicesTypes.HEATER_COOLER)
Expand Down
22 changes: 11 additions & 11 deletions tests/components/netatmo/test_device_trigger.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ def calls(hass):
@pytest.mark.parametrize(
"platform,device_type,event_types",
[
("camera", "NOC", OUTDOOR_CAMERA_TRIGGERS),
("camera", "NACamera", INDOOR_CAMERA_TRIGGERS),
("climate", "NRV", CLIMATE_TRIGGERS),
("climate", "NATherm1", CLIMATE_TRIGGERS),
("camera", "Smart Outdoor Camera", OUTDOOR_CAMERA_TRIGGERS),
("camera", "Smart Indoor Camera", INDOOR_CAMERA_TRIGGERS),
("climate", "Smart Valve", CLIMATE_TRIGGERS),
("climate", "Smart Thermostat", CLIMATE_TRIGGERS),
],
)
async def test_get_triggers(
Expand Down Expand Up @@ -105,15 +105,15 @@ async def test_get_triggers(

@pytest.mark.parametrize(
"platform,camera_type,event_type",
[("camera", "NOC", trigger) for trigger in OUTDOOR_CAMERA_TRIGGERS]
+ [("camera", "NACamera", trigger) for trigger in INDOOR_CAMERA_TRIGGERS]
[("camera", "Smart Outdoor Camera", trigger) for trigger in OUTDOOR_CAMERA_TRIGGERS]
+ [("camera", "Smart Indoor Camera", trigger) for trigger in INDOOR_CAMERA_TRIGGERS]
+ [
("climate", "NRV", trigger)
("climate", "Smart Valve", trigger)
for trigger in CLIMATE_TRIGGERS
if trigger not in SUBTYPES
]
+ [
("climate", "NATherm1", trigger)
("climate", "Smart Thermostat", trigger)
for trigger in CLIMATE_TRIGGERS
if trigger not in SUBTYPES
],
Expand Down Expand Up @@ -183,12 +183,12 @@ async def test_if_fires_on_event(
@pytest.mark.parametrize(
"platform,camera_type,event_type,sub_type",
[
("climate", "NRV", trigger, subtype)
("climate", "Smart Valve", trigger, subtype)
for trigger in SUBTYPES
for subtype in SUBTYPES[trigger]
]
+ [
("climate", "NATherm1", trigger, subtype)
("climate", "Smart Thermostat", trigger, subtype)
for trigger in SUBTYPES
for subtype in SUBTYPES[trigger]
],
Expand Down Expand Up @@ -262,7 +262,7 @@ async def test_if_fires_on_event_with_subtype(

@pytest.mark.parametrize(
"platform,device_type,event_type",
[("climate", "NAPLUG", trigger) for trigger in CLIMATE_TRIGGERS],
[("climate", "NAPlug", trigger) for trigger in CLIMATE_TRIGGERS],
)
async def test_if_invalid_device(
hass, device_reg, entity_reg, platform, device_type, event_type
Expand Down

0 comments on commit 1c74279

Please sign in to comment.