Warn if total_increasing sensor has negative states (#56564)

This commit is contained in:
Erik Montnemery 2021-09-30 16:49:16 +02:00 committed by GitHub
parent 3a56e3a823
commit 6954614e62
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 188 additions and 27 deletions

View file

@ -922,12 +922,14 @@ async def test_entity_source_admin(hass, websocket_client, hass_admin_user):
assert msg["success"]
assert msg["result"] == {
"test_domain.entity_1": {
"source": entity.SOURCE_PLATFORM_CONFIG,
"custom_component": False,
"domain": "test_platform",
"source": entity.SOURCE_PLATFORM_CONFIG,
},
"test_domain.entity_2": {
"source": entity.SOURCE_PLATFORM_CONFIG,
"custom_component": False,
"domain": "test_platform",
"source": entity.SOURCE_PLATFORM_CONFIG,
},
}
@ -942,8 +944,9 @@ async def test_entity_source_admin(hass, websocket_client, hass_admin_user):
assert msg["success"]
assert msg["result"] == {
"test_domain.entity_2": {
"source": entity.SOURCE_PLATFORM_CONFIG,
"custom_component": False,
"domain": "test_platform",
"source": entity.SOURCE_PLATFORM_CONFIG,
},
}
@ -962,12 +965,14 @@ async def test_entity_source_admin(hass, websocket_client, hass_admin_user):
assert msg["success"]
assert msg["result"] == {
"test_domain.entity_1": {
"source": entity.SOURCE_PLATFORM_CONFIG,
"custom_component": False,
"domain": "test_platform",
"source": entity.SOURCE_PLATFORM_CONFIG,
},
"test_domain.entity_2": {
"source": entity.SOURCE_PLATFORM_CONFIG,
"custom_component": False,
"domain": "test_platform",
"source": entity.SOURCE_PLATFORM_CONFIG,
},
}
@ -1001,8 +1006,9 @@ async def test_entity_source_admin(hass, websocket_client, hass_admin_user):
assert msg["success"]
assert msg["result"] == {
"test_domain.entity_2": {
"source": entity.SOURCE_PLATFORM_CONFIG,
"custom_component": False,
"domain": "test_platform",
"source": entity.SOURCE_PLATFORM_CONFIG,
},
}