1
mirror of https://github.com/home-assistant/core synced 2024-08-15 18:25:44 +02:00

Make Shelly update sensors disabled by default (#79376)

This commit is contained in:
Shay Levy 2022-09-30 21:37:58 +03:00 committed by GitHub
parent 5cdf4220ee
commit c70ca1572b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 8 deletions

View File

@ -70,7 +70,7 @@ REST_UPDATES: Final = {
install=lambda wrapper: wrapper.async_trigger_ota_update(),
device_class=UpdateDeviceClass.FIRMWARE,
entity_category=EntityCategory.CONFIG,
entity_registry_enabled_default=True,
entity_registry_enabled_default=False,
),
"fwupdate_beta": RestUpdateDescription(
name="Beta Firmware Update",
@ -94,7 +94,7 @@ RPC_UPDATES: Final = {
install=lambda wrapper: wrapper.async_trigger_ota_update(),
device_class=UpdateDeviceClass.FIRMWARE,
entity_category=EntityCategory.CONFIG,
entity_registry_enabled_default=True,
entity_registry_enabled_default=False,
),
"fwupdate_beta": RpcUpdateDescription(
name="Beta Firmware Update",

View File

@ -1,7 +1,6 @@
"""Tests for Shelly update platform."""
from homeassistant.components.shelly.const import DOMAIN
from homeassistant.components.update import DOMAIN as UPDATE_DOMAIN
from homeassistant.components.update.const import SERVICE_INSTALL
from homeassistant.components.update import DOMAIN as UPDATE_DOMAIN, SERVICE_INSTALL
from homeassistant.const import ATTR_ENTITY_ID, STATE_ON, STATE_UNKNOWN
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_component import async_update_entity
@ -16,8 +15,8 @@ async def test_block_update(hass: HomeAssistant, coap_wrapper, monkeypatch):
entity_registry.async_get_or_create(
UPDATE_DOMAIN,
DOMAIN,
"test_name_update",
suggested_object_id="test_name_update",
"test-mac-fwupdate",
suggested_object_id="test_name_firmware_update",
disabled_by=None,
)
hass.async_create_task(
@ -62,8 +61,8 @@ async def test_rpc_update(hass: HomeAssistant, rpc_wrapper, monkeypatch):
entity_registry.async_get_or_create(
UPDATE_DOMAIN,
DOMAIN,
"test_name_update",
suggested_object_id="test_name_update",
"12345678-sys-fwupdate",
suggested_object_id="test_name_firmware_update",
disabled_by=None,
)