diff --git a/homeassistant/components/dormakaba_dkey/binary_sensor.py b/homeassistant/components/dormakaba_dkey/binary_sensor.py index 95e26a3eeb3..e21e35da1e5 100644 --- a/homeassistant/components/dormakaba_dkey/binary_sensor.py +++ b/homeassistant/components/dormakaba_dkey/binary_sensor.py @@ -45,9 +45,10 @@ BINARY_SENSOR_DESCRIPTIONS = ( ), DormakabaDkeyBinarySensorDescription( key="security_locked", - name="Dead bolt", + name="Deadbolt", device_class=BinarySensorDeviceClass.LOCK, - is_on=lambda state: state.unlock_status != UnlockStatus.SECURITY_LOCKED, + is_on=lambda state: state.unlock_status + not in (UnlockStatus.SECURITY_LOCKED, UnlockStatus.UNLOCKED_SECURITY_LOCKED), ), ) diff --git a/homeassistant/components/frontend/manifest.json b/homeassistant/components/frontend/manifest.json index da68e48cc08..a4d97201c5f 100644 --- a/homeassistant/components/frontend/manifest.json +++ b/homeassistant/components/frontend/manifest.json @@ -20,5 +20,5 @@ "documentation": "https://www.home-assistant.io/integrations/frontend", "integration_type": "system", "quality_scale": "internal", - "requirements": ["home-assistant-frontend==20230306.0"] + "requirements": ["home-assistant-frontend==20230309.0"] } diff --git a/homeassistant/components/hassio/http.py b/homeassistant/components/hassio/http.py index 8a8583a7daf..fecf05f74b4 100644 --- a/homeassistant/components/hassio/http.py +++ b/homeassistant/components/hassio/http.py @@ -53,7 +53,7 @@ PATHS_NOT_ONBOARDED = re.compile( r")$" ) -# Authenticated users manage backups + download logs +# Authenticated users manage backups + download logs, changelog and documentation PATHS_ADMIN = re.compile( r"^(?:" r"|backups/[a-f0-9]{8}(/info|/download|/restore/full|/restore/partial)?" @@ -66,7 +66,7 @@ PATHS_ADMIN = re.compile( r"|multicast/logs" r"|observer/logs" r"|supervisor/logs" - r"|addons/[^/]+/logs" + r"|addons/[^/]+/(changelog|documentation|logs)" r")$" ) diff --git a/homeassistant/components/mazda/manifest.json b/homeassistant/components/mazda/manifest.json index 64bb8bef0c0..2c2aafa960e 100644 --- a/homeassistant/components/mazda/manifest.json +++ b/homeassistant/components/mazda/manifest.json @@ -7,5 +7,5 @@ "iot_class": "cloud_polling", "loggers": ["pymazda"], "quality_scale": "platinum", - "requirements": ["pymazda==0.3.7"] + "requirements": ["pymazda==0.3.8"] } diff --git a/homeassistant/components/mqtt/light/schema_basic.py b/homeassistant/components/mqtt/light/schema_basic.py index 153726a89e8..358a97ed30d 100644 --- a/homeassistant/components/mqtt/light/schema_basic.py +++ b/homeassistant/components/mqtt/light/schema_basic.py @@ -495,8 +495,12 @@ class MqttLight(MqttEntity, LightEntity, RestoreEntity): self._attr_color_mode = color_mode if self._topic[CONF_BRIGHTNESS_STATE_TOPIC] is None: rgb = convert_color(*color) - percent_bright = float(color_util.color_RGB_to_hsv(*rgb)[2]) / 100.0 - self._attr_brightness = min(round(percent_bright * 255), 255) + brightness = max(rgb) + self._attr_brightness = brightness + # Normalize the color to 100% brightness + color = tuple( + min(round(channel / brightness * 255), 255) for channel in color + ) return color @callback diff --git a/homeassistant/components/mqtt/sensor.py b/homeassistant/components/mqtt/sensor.py index df51dd60a15..1eabb509abd 100644 --- a/homeassistant/components/mqtt/sensor.py +++ b/homeassistant/components/mqtt/sensor.py @@ -281,7 +281,7 @@ class MqttSensor(MqttEntity, RestoreSensor): else: self._attr_native_value = new_value return - if self.device_class is None: + if self.device_class in {None, SensorDeviceClass.ENUM}: self._attr_native_value = new_value return if (payload_datetime := dt_util.parse_datetime(new_value)) is None: diff --git a/homeassistant/components/roomba/manifest.json b/homeassistant/components/roomba/manifest.json index 5aa630df5d0..08815cae9fb 100644 --- a/homeassistant/components/roomba/manifest.json +++ b/homeassistant/components/roomba/manifest.json @@ -24,5 +24,5 @@ "documentation": "https://www.home-assistant.io/integrations/roomba", "iot_class": "local_push", "loggers": ["paho_mqtt", "roombapy"], - "requirements": ["roombapy==1.6.5"] + "requirements": ["roombapy==1.6.6"] } diff --git a/homeassistant/const.py b/homeassistant/const.py index e90ccad63e5..82b9fd1a31b 100644 --- a/homeassistant/const.py +++ b/homeassistant/const.py @@ -8,7 +8,7 @@ from .backports.enum import StrEnum APPLICATION_NAME: Final = "HomeAssistant" MAJOR_VERSION: Final = 2023 MINOR_VERSION: Final = 3 -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, 10, 0) diff --git a/homeassistant/package_constraints.txt b/homeassistant/package_constraints.txt index 4e4786e7edc..0d3be634e77 100644 --- a/homeassistant/package_constraints.txt +++ b/homeassistant/package_constraints.txt @@ -23,7 +23,7 @@ fnvhash==0.1.0 hass-nabucasa==0.61.0 hassil==1.0.6 home-assistant-bluetooth==1.9.3 -home-assistant-frontend==20230306.0 +home-assistant-frontend==20230309.0 home-assistant-intents==2023.2.28 httpx==0.23.3 ifaddr==0.1.7 diff --git a/pyproject.toml b/pyproject.toml index 34e88267645..0dcc14344ab 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "homeassistant" -version = "2023.3.2" +version = "2023.3.3" license = {text = "Apache-2.0"} description = "Open-source home automation platform running on Python 3." readme = "README.rst" diff --git a/requirements_all.txt b/requirements_all.txt index fb17dc6d4da..33e6d70f7e7 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -907,7 +907,7 @@ hole==0.8.0 holidays==0.18.0 # homeassistant.components.frontend -home-assistant-frontend==20230306.0 +home-assistant-frontend==20230309.0 # homeassistant.components.conversation home-assistant-intents==2023.2.28 @@ -1771,7 +1771,7 @@ pymailgunner==1.4 pymata-express==1.19 # homeassistant.components.mazda -pymazda==0.3.7 +pymazda==0.3.8 # homeassistant.components.mediaroom pymediaroom==0.6.5.4 @@ -2264,7 +2264,7 @@ rocketchat-API==0.6.1 rokuecp==0.17.1 # homeassistant.components.roomba -roombapy==1.6.5 +roombapy==1.6.6 # homeassistant.components.roon roonapi==0.1.3 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index bd5fe240e34..e2f1b0f7513 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -690,7 +690,7 @@ hole==0.8.0 holidays==0.18.0 # homeassistant.components.frontend -home-assistant-frontend==20230306.0 +home-assistant-frontend==20230309.0 # homeassistant.components.conversation home-assistant-intents==2023.2.28 @@ -1275,7 +1275,7 @@ pymailgunner==1.4 pymata-express==1.19 # homeassistant.components.mazda -pymazda==0.3.7 +pymazda==0.3.8 # homeassistant.components.melcloud pymelcloud==2.5.8 @@ -1600,7 +1600,7 @@ ring_doorbell==0.7.2 rokuecp==0.17.1 # homeassistant.components.roomba -roombapy==1.6.5 +roombapy==1.6.6 # homeassistant.components.roon roonapi==0.1.3 diff --git a/tests/components/hassio/test_http.py b/tests/components/hassio/test_http.py index cb1dd639ec6..e659fbe4b8f 100644 --- a/tests/components/hassio/test_http.py +++ b/tests/components/hassio/test_http.py @@ -288,6 +288,8 @@ async def test_forward_request_not_onboarded_unallowed_paths( ("backups/1234abcd/info", True), ("supervisor/logs", True), ("addons/bl_b392/logs", True), + ("addons/bl_b392/changelog", True), + ("addons/bl_b392/documentation", True), ], ) async def test_forward_request_admin_get( diff --git a/tests/components/mqtt/test_light.py b/tests/components/mqtt/test_light.py index 1e486a3492c..fcdec1fbfe3 100644 --- a/tests/components/mqtt/test_light.py +++ b/tests/components/mqtt/test_light.py @@ -636,8 +636,8 @@ async def test_brightness_from_rgb_controlling_scale( } }, ) + mqtt_mock = await mqtt_mock_entry_with_yaml_config() await hass.async_block_till_done() - await mqtt_mock_entry_with_yaml_config() state = hass.states.get("light.test") assert state.state == STATE_UNKNOWN @@ -650,10 +650,29 @@ async def test_brightness_from_rgb_controlling_scale( state = hass.states.get("light.test") assert state.attributes.get("brightness") == 255 - async_fire_mqtt_message(hass, "test_scale_rgb/rgb/status", "127,0,0") + async_fire_mqtt_message(hass, "test_scale_rgb/rgb/status", "128,64,32") state = hass.states.get("light.test") - assert state.attributes.get("brightness") == 127 + assert state.attributes.get("brightness") == 128 + assert state.attributes.get("rgb_color") == (255, 128, 64) + + mqtt_mock.async_publish.reset_mock() + await common.async_turn_on(hass, "light.test", brightness=191) + await hass.async_block_till_done() + + mqtt_mock.async_publish.assert_has_calls( + [ + call("test_scale_rgb/set", "on", 0, False), + call("test_scale_rgb/rgb/set", "191,95,47", 0, False), + ], + any_order=True, + ) + async_fire_mqtt_message(hass, "test_scale_rgb/rgb/status", "191,95,47") + await hass.async_block_till_done() + + state = hass.states.get("light.test") + assert state.attributes.get("brightness") == 191 + assert state.attributes.get("rgb_color") == (255, 127, 63) async def test_controlling_state_via_topic_with_templates( diff --git a/tests/components/mqtt/test_sensor.py b/tests/components/mqtt/test_sensor.py index 09944b56c04..cee3aae375a 100644 --- a/tests/components/mqtt/test_sensor.py +++ b/tests/components/mqtt/test_sensor.py @@ -135,6 +135,8 @@ async def test_setting_sensor_value_via_mqtt_message( False, ), (sensor.SensorDeviceClass.TIMESTAMP, "invalid", STATE_UNKNOWN, True), + (sensor.SensorDeviceClass.ENUM, "some_value", "some_value", False), + (None, "some_value", "some_value", False), ], ) async def test_setting_sensor_native_value_handling_via_mqtt_message(