mirror of
https://github.com/esphome/esphome.git
synced 2025-09-30 09:02:17 +01:00
IDF 5 fixes for various components from test1.yaml (#5451)
This commit is contained in:
@@ -128,7 +128,7 @@ async def to_code(config):
|
||||
use_state_callback = True
|
||||
for conf in config.get(CONF_ON_ERROR, []):
|
||||
trigger = cg.new_Pvariable(conf[CONF_TRIGGER_ID], var)
|
||||
await automation.build_automation(trigger, [(int, "x")], conf)
|
||||
await automation.build_automation(trigger, [(cg.uint8, "x")], conf)
|
||||
use_state_callback = True
|
||||
if use_state_callback:
|
||||
cg.add_define("USE_OTA_STATE_CALLBACK")
|
||||
|
@@ -54,7 +54,7 @@ class OTAEndTrigger : public Trigger<> {
|
||||
}
|
||||
};
|
||||
|
||||
class OTAErrorTrigger : public Trigger<int> {
|
||||
class OTAErrorTrigger : public Trigger<uint8_t> {
|
||||
public:
|
||||
explicit OTAErrorTrigger(OTAComponent *parent) {
|
||||
parent->add_on_state_callback([this, parent](OTAState state, float progress, uint8_t error) {
|
||||
|
Reference in New Issue
Block a user