Binary sensor templates can return unknown state (#39739)

This commit is contained in:
epenet 2025-06-30 10:52:58 +02:00 committed by GitHub
parent 303d0b4f18
commit 120b257403
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -382,7 +382,7 @@ binary_sensor:
type: device_class type: device_class
default: None default: None
state: state:
description: The sensor is `on` if the template evaluates as `True`, `yes`, `on`, `enable` or a positive number. Any other value will render it as `off`. The actual appearance in the frontend (`Open`/`Closed`, `Detected`/`Clear` etc) depends on the sensor's device_class value description: The sensor is `on` if the template evaluates as `True`, `yes`, `on`, `enable` or a positive number. The sensor is `unknown` if the template evaluates as `None`. Any other value will render it as `off`. The actual appearance in the frontend (`Open`/`Closed`, `Detected`/`Clear` etc) depends on the sensor's device_class value
required: true required: true
type: template type: template