mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Make Shelly update sensors disabled by default (#79376)
This commit is contained in:
parent
5cdf4220ee
commit
c70ca1572b
@ -70,7 +70,7 @@ REST_UPDATES: Final = {
|
|||||||
install=lambda wrapper: wrapper.async_trigger_ota_update(),
|
install=lambda wrapper: wrapper.async_trigger_ota_update(),
|
||||||
device_class=UpdateDeviceClass.FIRMWARE,
|
device_class=UpdateDeviceClass.FIRMWARE,
|
||||||
entity_category=EntityCategory.CONFIG,
|
entity_category=EntityCategory.CONFIG,
|
||||||
entity_registry_enabled_default=True,
|
entity_registry_enabled_default=False,
|
||||||
),
|
),
|
||||||
"fwupdate_beta": RestUpdateDescription(
|
"fwupdate_beta": RestUpdateDescription(
|
||||||
name="Beta Firmware Update",
|
name="Beta Firmware Update",
|
||||||
@ -94,7 +94,7 @@ RPC_UPDATES: Final = {
|
|||||||
install=lambda wrapper: wrapper.async_trigger_ota_update(),
|
install=lambda wrapper: wrapper.async_trigger_ota_update(),
|
||||||
device_class=UpdateDeviceClass.FIRMWARE,
|
device_class=UpdateDeviceClass.FIRMWARE,
|
||||||
entity_category=EntityCategory.CONFIG,
|
entity_category=EntityCategory.CONFIG,
|
||||||
entity_registry_enabled_default=True,
|
entity_registry_enabled_default=False,
|
||||||
),
|
),
|
||||||
"fwupdate_beta": RpcUpdateDescription(
|
"fwupdate_beta": RpcUpdateDescription(
|
||||||
name="Beta Firmware Update",
|
name="Beta Firmware Update",
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
"""Tests for Shelly update platform."""
|
"""Tests for Shelly update platform."""
|
||||||
from homeassistant.components.shelly.const import DOMAIN
|
from homeassistant.components.shelly.const import DOMAIN
|
||||||
from homeassistant.components.update import DOMAIN as UPDATE_DOMAIN
|
from homeassistant.components.update import DOMAIN as UPDATE_DOMAIN, SERVICE_INSTALL
|
||||||
from homeassistant.components.update.const import SERVICE_INSTALL
|
|
||||||
from homeassistant.const import ATTR_ENTITY_ID, STATE_ON, STATE_UNKNOWN
|
from homeassistant.const import ATTR_ENTITY_ID, STATE_ON, STATE_UNKNOWN
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.helpers.entity_component import async_update_entity
|
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(
|
entity_registry.async_get_or_create(
|
||||||
UPDATE_DOMAIN,
|
UPDATE_DOMAIN,
|
||||||
DOMAIN,
|
DOMAIN,
|
||||||
"test_name_update",
|
"test-mac-fwupdate",
|
||||||
suggested_object_id="test_name_update",
|
suggested_object_id="test_name_firmware_update",
|
||||||
disabled_by=None,
|
disabled_by=None,
|
||||||
)
|
)
|
||||||
hass.async_create_task(
|
hass.async_create_task(
|
||||||
@ -62,8 +61,8 @@ async def test_rpc_update(hass: HomeAssistant, rpc_wrapper, monkeypatch):
|
|||||||
entity_registry.async_get_or_create(
|
entity_registry.async_get_or_create(
|
||||||
UPDATE_DOMAIN,
|
UPDATE_DOMAIN,
|
||||||
DOMAIN,
|
DOMAIN,
|
||||||
"test_name_update",
|
"12345678-sys-fwupdate",
|
||||||
suggested_object_id="test_name_update",
|
suggested_object_id="test_name_firmware_update",
|
||||||
disabled_by=None,
|
disabled_by=None,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user