We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When setting up sentences for binary sensors, it's usually a repetitive process, but with slight variations.
- sentences: - "(is|are) <name> [battery] {bs_battery_states:state} [in <area>]" response: one_yesno requires_context: domain: binary_sensor device_class: battery slots: domain: binary_sensor device_class: battery ... - sentences: - "(is|are) <name> {bs_gas_states:state} [in <area>]" response: one_yesno requires_context: domain: binary_sensor device_class: gas slots: domain: binary_sensor device_class: gas
We could define a template sentence in _common.yaml
_common.yaml
sentence_templates: is_name_state_in_area: sentence: "(is|are) <name> <state> [in <area>]" defaults: state: "{state}"
write these sentences in a more extensible manner like this
- sentences: - template: is_name_state_in_area data: name: "<name> [battery]" state: "{bs_battery_states:state}" response: one_yesno requires_context: domain: binary_sensor device_class: battery slots: domain: binary_sensor device_class: battery ... - sentences: - template: is_name_state_in_area data: name: "<name>" state: "{bs_gas_states:state}" response: one_yesno requires_context: domain: binary_sensor device_class: gas slots: domain: binary_sensor device_class: gas
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When setting up sentences for binary sensors, it's usually a repetitive process, but with slight variations.
We could define a template sentence in
_common.yaml
write these sentences in a more extensible manner like this
The text was updated successfully, but these errors were encountered: