mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Remove dead code from template fan (#72917)
This commit is contained in:
parent
fc8727454a
commit
b89cd37de8
@ -54,7 +54,6 @@ CONF_DIRECTION_TEMPLATE = "direction_template"
|
|||||||
CONF_ON_ACTION = "turn_on"
|
CONF_ON_ACTION = "turn_on"
|
||||||
CONF_OFF_ACTION = "turn_off"
|
CONF_OFF_ACTION = "turn_off"
|
||||||
CONF_SET_PERCENTAGE_ACTION = "set_percentage"
|
CONF_SET_PERCENTAGE_ACTION = "set_percentage"
|
||||||
CONF_SET_SPEED_ACTION = "set_speed"
|
|
||||||
CONF_SET_OSCILLATING_ACTION = "set_oscillating"
|
CONF_SET_OSCILLATING_ACTION = "set_oscillating"
|
||||||
CONF_SET_DIRECTION_ACTION = "set_direction"
|
CONF_SET_DIRECTION_ACTION = "set_direction"
|
||||||
CONF_SET_PRESET_MODE_ACTION = "set_preset_mode"
|
CONF_SET_PRESET_MODE_ACTION = "set_preset_mode"
|
||||||
@ -153,12 +152,6 @@ class TemplateFan(TemplateEntity, FanEntity):
|
|||||||
self._on_script = Script(hass, config[CONF_ON_ACTION], friendly_name, DOMAIN)
|
self._on_script = Script(hass, config[CONF_ON_ACTION], friendly_name, DOMAIN)
|
||||||
self._off_script = Script(hass, config[CONF_OFF_ACTION], friendly_name, DOMAIN)
|
self._off_script = Script(hass, config[CONF_OFF_ACTION], friendly_name, DOMAIN)
|
||||||
|
|
||||||
self._set_speed_script = None
|
|
||||||
if set_speed_action := config.get(CONF_SET_SPEED_ACTION):
|
|
||||||
self._set_speed_script = Script(
|
|
||||||
hass, set_speed_action, friendly_name, DOMAIN
|
|
||||||
)
|
|
||||||
|
|
||||||
self._set_percentage_script = None
|
self._set_percentage_script = None
|
||||||
if set_percentage_action := config.get(CONF_SET_PERCENTAGE_ACTION):
|
if set_percentage_action := config.get(CONF_SET_PERCENTAGE_ACTION):
|
||||||
self._set_percentage_script = Script(
|
self._set_percentage_script = Script(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user