Add default icon to restart button (#7076)

Co-authored-by: Leo Schelvis <leo.schelvis@gmail.com>
This commit is contained in:
leejoow 2024-07-11 22:20:58 +02:00 committed by GitHub
parent d071b05249
commit d209a2b45a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -5,6 +5,7 @@ from esphome.const import (
CONF_ID,
DEVICE_CLASS_RESTART,
ENTITY_CATEGORY_CONFIG,
ICON_RESTART,
)
restart_ns = cg.esphome_ns.namespace("restart")
@ -12,6 +13,7 @@ RestartButton = restart_ns.class_("RestartButton", button.Button, cg.Component)
CONFIG_SCHEMA = button.button_schema(
RestartButton,
icon=ICON_RESTART,
device_class=DEVICE_CLASS_RESTART,
entity_category=ENTITY_CATEGORY_CONFIG,
).extend(cv.COMPONENT_SCHEMA)