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 Jesse Hills
parent 91bb38553d
commit a34cec217e
No known key found for this signature in database
GPG key ID: BEAAE804EFD8E83A

View file

@ -5,6 +5,7 @@ from esphome.const import (
CONF_ID, CONF_ID,
DEVICE_CLASS_RESTART, DEVICE_CLASS_RESTART,
ENTITY_CATEGORY_CONFIG, ENTITY_CATEGORY_CONFIG,
ICON_RESTART,
) )
restart_ns = cg.esphome_ns.namespace("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( CONFIG_SCHEMA = button.button_schema(
RestartButton, RestartButton,
icon=ICON_RESTART,
device_class=DEVICE_CLASS_RESTART, device_class=DEVICE_CLASS_RESTART,
entity_category=ENTITY_CATEGORY_CONFIG, entity_category=ENTITY_CATEGORY_CONFIG,
).extend(cv.COMPONENT_SCHEMA) ).extend(cv.COMPONENT_SCHEMA)