-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow binary sensor template to return state unknown #128861
base: dev
Are you sure you want to change the base?
Conversation
Hey there @PhracturedBlue, @tetienne, @home-assistant/core, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
5f580c5
to
f1b0a56
Compare
I don't believe this is critical for the November release. |
59f531f
to
9b789d4
Compare
The architecture discussion isn't approved yet. Draft for now. |
There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. |
Any reason this is still a draft? |
Still waiting on arch discussion I think... |
Breaking change
Previously, binary_sensor template entities could have the state
on
oroff
, and in case of YAML definition possiblyunavailable
. However, compared to other entities, it wasn't able to have theunknown
state, which has been added.So, a binary_sensor template entity can now have the
on
,off
,unavailable
, orunknown
state.You might need to adapt your templates, or automations/scripts to take this new
unknown
state into account.Note: although other values are still possible, it is recommended to always return one of
True
/False
/None
.Proposed change
As follow-up to #60193, and as alternative to #126909/#128963
Proposal for architecture discussion home-assistant/architecture#1148
Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
.To help with the load of incoming pull requests: