Add id() for restoring global (#2454)

This commit is contained in:
Jesse Hills 2021-10-06 22:35:11 +13:00 committed by GitHub
parent 955c96731e
commit 22e3bc7cfe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -76,6 +76,7 @@ template<class C, typename... Ts> class GlobalVarSetAction : public Action<Ts...
};
template<typename T> T &id(GlobalsComponent<T> *value) { return value->value(); }
template<typename T> T &id(RestoringGlobalsComponent<T> *value) { return value->value(); }
} // namespace globals
} // namespace esphome