reactive always_update with default from __init__ #2774
Unanswered
davetapley
asked this question in
Q&A
Replies: 1 comment 6 replies
-
This would be the common idiom, just with the type declaration done to allow for |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I need to make this
reactive
always_update
:However ⬇️ isn't valid because
Argument missing for parameter "default"
Neither is ⬇️ because
Argument of type "None" cannot be assigned to parameter "default"
And I can't change in
__init__
⬇️ becauseCannot assign member "sensor_id" ... "reactive[Id]" is incompatible with "Id"
Luckily my
Id
is just a wrapper forstr
, so I can use this default as a placeholder:But I can imagine something which had no default.
Beta Was this translation helpful? Give feedback.
All reactions