diff --git a/source/_integrations/alert.markdown b/source/_integrations/alert.markdown index fb017346fa1..9868b741d20 100644 --- a/source/_integrations/alert.markdown +++ b/source/_integrations/alert.markdown @@ -158,17 +158,16 @@ conjunction with a `Template Binary Sensor`. The following example does that. {% raw %} ```yaml -binary_sensor: - - platform: template - sensors: - motion_battery_low: - value_template: "{{ state_attr('sensor.motion', 'battery') < 15 }}" - friendly_name: "Motion battery is low" +template: + - binary_sensor: + - name: "Motion Battery is Low" + state: "{{ state_attr('sensor.motion', 'battery') | float(default=0) < 15 }}" + device_class: battery alert: motion_battery: name: Motion Battery is Low - entity_id: binary_sensor.motion_battery_low + entity_id: binary_sensor.motion_battery_is_low repeat: 30 notifiers: - ryans_phone