mirror of
https://github.com/esphome/esphome.git
synced 2026-05-11 14:49:06 +08:00
[globals] Fix TemplatableFn deprecation warning for globals.set (#15733)
This commit is contained in:
committed by
Jesse Hills
parent
311812c8cc
commit
089a2c99e2
@@ -4,6 +4,14 @@ esphome:
|
||||
- globals.set:
|
||||
id: glob_int
|
||||
value: "10"
|
||||
# Set a float global with an integer literal - must emit the correct
|
||||
# return type so TemplatableFn stores a direct function pointer.
|
||||
- globals.set:
|
||||
id: glob_float
|
||||
value: "102"
|
||||
- globals.set:
|
||||
id: glob_float
|
||||
value: !lambda "return 42;"
|
||||
|
||||
globals:
|
||||
- id: glob_int
|
||||
|
||||
Reference in New Issue
Block a user