Mark entities from the sun as diagnostic (#92909)

This commit is contained in:
Franck Nijhof 2023-05-11 11:27:19 +02:00 committed by GitHub
parent 75f8ea48f4
commit 67d5ca4894
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View file

@ -6,6 +6,7 @@ import astral.sun
from freezegun import freeze_time
from homeassistant.components import sun
from homeassistant.const import EntityCategory
from homeassistant.core import HomeAssistant
import homeassistant.helpers.entity_registry as er
from homeassistant.setup import async_setup_component
@ -98,4 +99,6 @@ async def test_setting_rising(hass: HomeAssistant) -> None:
entity_reg = er.async_get(hass)
entity = entity_reg.async_get("sensor.sun_next_dawn")
assert entity
assert entity.entity_category is EntityCategory.DIAGNOSTIC
assert entity.unique_id == f"{entry_ids[0].entry_id}-next_dawn"