Fix entity category for binary_sensor fails setup (#103511)

This commit is contained in:
Jan Bouwhuis
2023-11-08 14:10:24 +01:00
committed by GitHub
parent 5bb3c7ca55
commit db97e7588b
2 changed files with 23 additions and 0 deletions

View File

@ -2172,6 +2172,18 @@ async def test_setup_manual_mqtt_with_invalid_config(
},
"sensor.test",
),
(
{
mqtt.DOMAIN: {
"binary_sensor": {
"name": "test",
"state_topic": "test-topic",
"entity_category": "config",
}
}
},
"binary_sensor.test",
),
],
)
@patch(
@ -2195,6 +2207,14 @@ async def test_setup_manual_mqtt_with_invalid_entity_category(
@pytest.mark.parametrize(
("config", "entity_id"),
[
(
{
"name": "test",
"state_topic": "test-topic",
"entity_category": "config",
},
"binary_sensor.test",
),
(
{
"name": "test",