Problem triggering update notification automation

I’m having a problem with an automation I’ve written to notify me of an update to HA. I’ve seen the sensor switch to on when I restarted HA, but the automation never triggers. Any suggestions?

- id: update_available_notification
  alias: "Update Available Notification"
    - entity_id: binary_sensor.updaterstate
      platform: state
      to: 'on'
  - condition: state
    entity_id: binary_sensor.updaterstate
    state: 'on'
    - service: notify.alert_message
        message: "Home Assistant {{ state_attr('binary_sensor.updater', 'newest_version') }} is available."

In your trigger and your condition (which btw is not necessary in the case) you use binary_sensor.updaterstate instead of the correct binary_sensor.updater