Add missing kelvin attributes to light recorder platform (#88561)

This commit is contained in:
J. Nick Koston 2023-02-21 14:23:53 -06:00 committed by GitHub
parent ff93b7a01c
commit e6c792deed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View file

@ -5,7 +5,9 @@ from homeassistant.core import HomeAssistant, callback
from . import (
ATTR_EFFECT_LIST,
ATTR_MAX_COLOR_TEMP_KELVIN,
ATTR_MAX_MIREDS,
ATTR_MIN_COLOR_TEMP_KELVIN,
ATTR_MIN_MIREDS,
ATTR_SUPPORTED_COLOR_MODES,
)
@ -19,4 +21,6 @@ def exclude_attributes(hass: HomeAssistant) -> set[str]:
ATTR_EFFECT_LIST,
ATTR_MIN_MIREDS,
ATTR_MAX_MIREDS,
ATTR_MIN_COLOR_TEMP_KELVIN,
ATTR_MAX_COLOR_TEMP_KELVIN,
}

View file

@ -6,7 +6,9 @@ from datetime import timedelta
from homeassistant.components import light
from homeassistant.components.light import (
ATTR_EFFECT,
ATTR_MAX_COLOR_TEMP_KELVIN,
ATTR_MAX_MIREDS,
ATTR_MIN_COLOR_TEMP_KELVIN,
ATTR_MIN_MIREDS,
ATTR_SUPPORTED_COLOR_MODES,
)
@ -53,3 +55,5 @@ async def test_exclude_attributes(recorder_mock: Recorder, hass: HomeAssistant)
assert ATTR_SUPPORTED_COLOR_MODES not in state.attributes
assert ATTR_EFFECT not in state.attributes
assert ATTR_FRIENDLY_NAME in state.attributes
assert ATTR_MAX_COLOR_TEMP_KELVIN not in state.attributes
assert ATTR_MIN_COLOR_TEMP_KELVIN not in state.attributes