mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-19 23:36:51 +00:00
update Brother integration examples with new template sensor format (#19656)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
parent
7e079e8e21
commit
5a2698745e
@ -37,21 +37,21 @@ For some Brother devices, `SNMPv3 read-write access and v1/v2c read-only access`
|
|||||||
|
|
||||||
## Sensor Example
|
## Sensor Example
|
||||||
|
|
||||||
You can configure Home Assistant to alert you when the printer jams or runs out of paper as follows. First, add the following to `configuration.yaml` under the `binary_sensor:` section (replace `sensor.hl_l2340d_status` with the actual name of your sensor):
|
You can configure Home Assistant to alert you when the printer jams or runs out of paper as follows. First, add the following to `configuration.yaml` under the `template:` section (Note: replace `sensor.hl_l2340d_status` with the actual name of your sensor):
|
||||||
|
|
||||||
{% raw %}
|
{% raw %}
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- platform: template
|
template:
|
||||||
sensors:
|
- binary_sensor:
|
||||||
laser_out_of_paper:
|
- name: 'Laser Printer Out Of Paper'
|
||||||
value_template: "{{ is_state('sensor.hl_l2340d_status', 'no paper') }}"
|
state: >
|
||||||
friendly_name: "Laser Printer Out of Paper"
|
{{ is_state('sensor.hl_l2340d_status', 'no paper') }}
|
||||||
- platform: template
|
|
||||||
sensors:
|
- binary_sensor:
|
||||||
laser_paper_jam:
|
- name: 'Later Printer Paper Jam'
|
||||||
value_template: "{{ is_state('sensor.hl_l2340d_status', 'paper jam') }}"
|
state: >
|
||||||
friendly_name: "Laser Printer Paper Jam"
|
{{ is_state('sensor.hl_l2340d_status', 'paper jam') }}
|
||||||
```
|
```
|
||||||
|
|
||||||
{% endraw %}
|
{% endraw %}
|
||||||
@ -62,14 +62,15 @@ Then, add this under the `alert:` section:
|
|||||||
laser_out_of_paper:
|
laser_out_of_paper:
|
||||||
name: Laser Printer is Out of Paper
|
name: Laser Printer is Out of Paper
|
||||||
done_message: Laser Printer Has Paper
|
done_message: Laser Printer Has Paper
|
||||||
entity_id: binary_sensor.laser_out_of_paper
|
entity_id: binary_sensor.laser_printer_out_of_paper
|
||||||
can_acknowledge: true
|
can_acknowledge: true
|
||||||
notifiers:
|
notifiers:
|
||||||
- my_phone_notify
|
- my_phone_notify
|
||||||
|
|
||||||
laser_paper_jam:
|
laser_paper_jam:
|
||||||
name: Laser Printer has a Paper Jam
|
name: Laser Printer has a Paper Jam
|
||||||
done_message: Laser Printer Paper Jam Cleared
|
done_message: Laser Printer Paper Jam Cleared
|
||||||
entity_id: binary_sensor.laser_paper_jam
|
entity_id: binary_sensor.laser_printer_paper_jam
|
||||||
can_acknowledge: true
|
can_acknowledge: true
|
||||||
notifiers:
|
notifiers:
|
||||||
- my_phone_notify
|
- my_phone_notify
|
||||||
|
Loading…
x
Reference in New Issue
Block a user