From 7c49a80dcc1fd8c0921ee2326119a4aea7d95e4a Mon Sep 17 00:00:00 2001 From: NP v/d Spek Date: Fri, 16 Aug 2024 16:25:44 +0200 Subject: [PATCH] fix some CI reported issue --- esphome/components/max7219digit/display.py | 14 ++++++++------ esphome/components/max7219digit/max7219digit.h | 1 - 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/esphome/components/max7219digit/display.py b/esphome/components/max7219digit/display.py index b629e1e043..35ff19782f 100644 --- a/esphome/components/max7219digit/display.py +++ b/esphome/components/max7219digit/display.py @@ -1,7 +1,7 @@ -import esphome.codegen as cg -import esphome.config_validation as cv -from esphome.components import display, spi from esphome import automation +import esphome.codegen as cg +from esphome.components import display, spi +import esphome.config_validation as cv from esphome.const import ( CONF_ID, CONF_INTENSITY, @@ -110,7 +110,9 @@ async def to_code(config): DisplayInvertAction = max7219_ns.class_("DisplayInvertAction", automation.Action) -DisplayVisibilityAction = max7219_ns.class_("DisplayVisibilityAction", automation.Action) +DisplayVisibilityAction = max7219_ns.class_( + "DisplayVisibilityAction", automation.Action +) DisplayReverseAction = max7219_ns.class_("DisplayReverseAction", automation.Action) DisplayIntensityAction = max7219_ns.class_("DisplayIntensityAction", automation.Action) @@ -144,10 +146,10 @@ async def MAX7219_inveert_to_code(config, action_id, template_arg, args): @automation.register_action( - "MAX7219.turn_off", DisplayVisiblityAction, MAX7219_OFF_ACTION_SCHEMA + "MAX7219.turn_off", DisplayVisibilityAction, MAX7219_OFF_ACTION_SCHEMA ) @automation.register_action( - "MAX7219.turn_on", DisplayVisiblityAction, MAX7219_ON_ACTION_SCHEMA + "MAX7219.turn_on", DisplayVisibilityAction, MAX7219_ON_ACTION_SCHEMA ) async def MAX7219_visible_to_code(config, action_id, template_arg, args): paren = await cg.get_variable(config[CONF_ID]) diff --git a/esphome/components/max7219digit/max7219digit.h b/esphome/components/max7219digit/max7219digit.h index c44073bd75..1e8d0c657c 100644 --- a/esphome/components/max7219digit/max7219digit.h +++ b/esphome/components/max7219digit/max7219digit.h @@ -120,7 +120,6 @@ class MAX7219Component : public display::DisplayBuffer, optional writer_local_{}; }; - template class DisplayInvertAction : public Action { public: DisplayInvertAction(MAX7219Component *buffer) : buffer_(buffer) {}