mirror of
https://github.com/esphome/esphome.git
synced 2024-12-26 23:41:45 +01:00
2f07225984
* Move stop/is_running implementation to Action base class Try to fix issue #1105. Until now if an UpdateComponentAction, a LambdaAction, or any action that can contain those inside their "else" or "then" action lists, resulted in a call to script.stop on the script that contains them, the script would continue running, because they didn't implement a stop() method. Basically only the asynchronous ones did: DelayAction, WaitUntilAction and ScriptWaitAction. With this change num_running_ in Action replaces DelayAction::num_running_ and WaitUntilAction::triggered_ to provide the same is_running logic to other actions. * Make some Action methods protected Apparently play()/stop() etc. are not meant to be called directly by users of the class and if they're called directly that would not give the expected result for the classes that have an empty play(). Make all methods except play_complex, stop_comples and is_running protected. While there also make RemoteTransmitterActionBase::encode protected. * lint * format Co-authored-by: Guillermo Ruffino <glm.net@gmail.com> |
||
---|---|---|
.. | ||
api | ||
components | ||
core | ||
dashboard | ||
__init__.py | ||
__main__.py | ||
automation.py | ||
codegen.py | ||
config.py | ||
config_helpers.py | ||
config_validation.py | ||
const.py | ||
core.py | ||
core_config.py | ||
cpp_generator.py | ||
cpp_helpers.py | ||
cpp_types.py | ||
espota2.py | ||
helpers.py | ||
legacy.py | ||
mqtt.py | ||
pins.py | ||
platformio_api.py | ||
py_compat.py | ||
storage_json.py | ||
symlink_ops.py | ||
util.py | ||
voluptuous_schema.py | ||
vscode.py | ||
wizard.py | ||
writer.py | ||
yaml_util.py | ||
zeroconf.py |