mirror of
https://github.com/esphome/esphome.git
synced 2026-09-20 19:48:39 +00:00
tests
This commit is contained in:
@@ -179,6 +179,12 @@ async def test_api_homeassistant(
|
||||
client.send_home_assistant_state("binary_sensor.external_motion", "", "ON")
|
||||
client.send_home_assistant_state("weather.home", "condition", "sunny")
|
||||
|
||||
# Test edge cases for zero-copy implementation safety
|
||||
# Empty entity_id should be silently ignored (no crash)
|
||||
client.send_home_assistant_state("", "", "should_be_ignored")
|
||||
# Empty state with valid entity should work
|
||||
client.send_home_assistant_state("sensor.external_temperature", "", "")
|
||||
|
||||
# List entities and services
|
||||
_, services = await client.list_entities_services()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user