diff --git a/source/_components/sensor.zoneminder.markdown b/source/_components/sensor.zoneminder.markdown index e60e2742058..fba8fe49a86 100644 --- a/source/_components/sensor.zoneminder.markdown +++ b/source/_components/sensor.zoneminder.markdown @@ -14,7 +14,7 @@ ha_iot_class: "Local Polling" --- -The `zoneminder` sensor platform lets you monitor the current state of your [ZoneMinder](https://www.zoneminder.com) install including the number of events and the current state of the cameras. +The `zoneminder` sensor platform lets you monitor the current state of your [ZoneMinder](https://www.zoneminder.com) install including the number of events, the current state of the cameras and ZoneMinder's current run state.
You must have the [ZoneMinder component](/components/zoneminder/) configured to use this sensor. diff --git a/source/_components/zoneminder.markdown b/source/_components/zoneminder.markdown index ac8297eaee8..a97c8a36f25 100644 --- a/source/_components/zoneminder.markdown +++ b/source/_components/zoneminder.markdown @@ -44,3 +44,19 @@ zoneminder: username: YOUR_USERNAME password: YOUR_PASSWORD ``` + +### {% linkable_title Service %} + +Once loaded, the `zoneminder` platform will expose a service (`set_run_state`) that can be used to change the current run state of ZoneMinder. + +| Service data attribute | Optional | Description | +|:-----------------------|:---------|:----------------------------------| +| `name` | no | Name of the new run state to set. | + +For example, if your ZoneMinder instance was configured with a run state called "Home", you could write an [automation](/getting-started/automation/) that changes ZoneMinder to the "Home" run state by including the following [action](/getting-started/automation-action/): + ```yaml +action: + service: zoneminder.set_run_state + data: + name: Home +```