Improve logging message for validation in climate (#125837)

This commit is contained in:
G Johansson 2024-09-12 21:41:00 +02:00 committed by GitHub
parent d530fd31b0
commit d259e4512b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 19 additions and 6 deletions

View file

@ -300,7 +300,9 @@ async def test_temperature_features_is_valid(
assert (
"MockClimateTempEntity set_temperature action was used "
"with temperature but the entity does not "
"implement the ClimateEntityFeature.TARGET_TEMPERATURE feature. Please"
"implement the ClimateEntityFeature.TARGET_TEMPERATURE feature. "
"This will stop working in 2025.4 and raise an error instead. "
"Please"
) in caplog.text
await hass.services.async_call(
@ -316,7 +318,9 @@ async def test_temperature_features_is_valid(
assert (
"MockClimateTempRangeEntity set_temperature action was used with "
"target_temp_low but the entity does not "
"implement the ClimateEntityFeature.TARGET_TEMPERATURE_RANGE feature. Please"
"implement the ClimateEntityFeature.TARGET_TEMPERATURE_RANGE feature. "
"This will stop working in 2025.4 and raise an error instead. "
"Please"
) in caplog.text
@ -385,7 +389,8 @@ async def test_mode_validation(
assert (
"MockClimateEntity sets the hvac_mode auto which is not valid "
"for this entity with modes: off, heat. This will stop working "
"in 2025.3 and raise an error instead. Please" in caplog.text
"in 2025.4 and raise an error instead. "
"Please" in caplog.text
)
with pytest.raises(