Monitor WordPress Updates in Home Assistant

I run Home Assistant as my central hub for anything worth monitoring — and that includes my WordPress site. One of the things I really like about HA is the ability to use dashboard badges to stay informed at a glance. I already have badges for things like my car’s charge level and office airco temperature, and I wanted to add one that tells me when my WordPress site needs attention — without having to open the WP admin panel just to check if there’s anything to do. In this post I’ll walk you through how I set up the sensor that makes this work, pulling WordPress update data directly into HA and displaying it as a badge in the dashboard header.

 Badges

Why bother?

Adding a WordPress update indicator to HA means I no longer need to log into the WordPress admin to check — it’s just always visible, right in the header alongside my other status badges. When something needs attention, I’ll see it. When everything is up to date, the badge stays out of the way.

 

How it works

The setup has two parts:

  1. A small PHP endpoint on the WordPress site that returns update data as JSON
  2. A REST sensor in Home Assistant that polls that endpoint every hour

When HA polls the endpoint, WordPress queries the WordPress.org API for plugin and core updates, and returns a JSON object with the total count, plugin names, current and new versions, and a timestamp. The sensor state becomes the update count; plugin details live in the attributes.

 

The PHP endpoint

I created a token-protected PHP file and placed it at:

/wp-content/ha-wp-updates.php

This location is deliberate — wp-content is a standard WordPress directory that any reader can use, regardless of which plugins they have installed. The endpoint bootstraps WordPress, runs wp_update_plugins() and wp_version_check() to force a fresh check, then returns a JSON response like this:

{
  "total_updates": 2,
  "core_update": null,
  "plugin_updates": [
    { "name": "CookieYes | GDPR Cookie Consent", "current": "3.5.0", "new": "3.5.1" },
    { "name": "Novamira", "current": "1.3.0", "new": "1.5.1" }
  ],
  "checked_at": "2026-05-29T10:00:00+00:00"
}

Access is protected by a secret token passed as a query parameter. Requests without the correct token get a 403 response.

 

The Home Assistant sensor

In configuration.yaml, add the following REST sensor:

rest:
  - resource: "https://rutg3r.com/wp-content/ha-wp-updates.php"
    params:
      token: "your_secret_token_here"
    scan_interval: 3600
    sensor:
      - name: "WordPress Updates"
        unique_id: wordpress_updates_rutg3r
        value_template: "{{ value_json.total_updates }}"
        unit_of_measurement: "updates"
        icon: "mdi:wordpress"
        state_class: measurement
        json_attributes:
          - plugin_updates
          - core_update
          - checked_at

After restarting HA, sensor.wordpress_updates becomes available. The state is the number of pending updates; the full plugin list is accessible via the sensor attributes.

 

The header badge

I added the sensor as a badge to my HA dashboard header bar. As you can see in the screenshot below, it sits naturally alongside the other badges — showing Rutg3r.com · 2 updates right next to the airco temperature and car charge level.

Badges with updatesTo keep things clean, I also configured the badge visibility so it only appears when there is at least one update available. Under the Visibility tab in the Entity Badge configuration, I set the condition to the WordPress Updates sensor with a numeric state above 0. This means the badge is completely hidden when everything is up to date — and appears the moment something needs attention.

Badges - visibilityWrapping up

A simple but satisfying integration. WordPress talks to HA, HA shows the count, and I never need to open the WordPress admin just to check for updates. If you run your own WordPress site alongside a home lab, this is a low-effort addition that fits naturally into an existing monitoring setup.

 

Privacy Preference Center