[fix] Status sensor does not check if required network component is missing (#7734)

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
Ramil Valitov 2024-11-25 01:23:30 +03:00 committed by GitHub
parent d4d630823c
commit e02f3cdac7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -6,6 +6,8 @@ from esphome.const import (
ENTITY_CATEGORY_DIAGNOSTIC, ENTITY_CATEGORY_DIAGNOSTIC,
) )
DEPENDENCIES = ["network"]
status_ns = cg.esphome_ns.namespace("status") status_ns = cg.esphome_ns.namespace("status")
StatusBinarySensor = status_ns.class_( StatusBinarySensor = status_ns.class_(
"StatusBinarySensor", binary_sensor.BinarySensor, cg.Component "StatusBinarySensor", binary_sensor.BinarySensor, cg.Component