From 8a8564272b369399c1bbba256a3dd4a89c55abd4 Mon Sep 17 00:00:00 2001 From: Chris Browet Date: Fri, 22 Oct 2021 22:57:24 +0200 Subject: [PATCH] add state_class to rest sensor & device_class to rest switch (#19860) --- source/_integrations/binary_sensor.rest.markdown | 2 +- source/_integrations/sensor.rest.markdown | 6 +++++- source/_integrations/switch.rest.markdown | 4 ++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/source/_integrations/binary_sensor.rest.markdown b/source/_integrations/binary_sensor.rest.markdown index 800007b6231..2575ee740de 100644 --- a/source/_integrations/binary_sensor.rest.markdown +++ b/source/_integrations/binary_sensor.rest.markdown @@ -86,7 +86,7 @@ name: type: string default: REST Binary Sensor device_class: - description: Sets the [class of the device](/integrations/binary_sensor/), changing the device state and icon that is displayed on the frontend. + description: Sets the [class of the device](/integrations/binary_sensor/#device-class), changing the device state and icon that is displayed on the frontend. required: false type: string value_template: diff --git a/source/_integrations/sensor.rest.markdown b/source/_integrations/sensor.rest.markdown index fe03fddffc6..4ff4d2e04b5 100644 --- a/source/_integrations/sensor.rest.markdown +++ b/source/_integrations/sensor.rest.markdown @@ -65,7 +65,11 @@ name: type: string default: REST Sensor device_class: - description: Sets the [class of the device](/integrations/sensor/), changing the device state and icon that is displayed on the frontend. + description: Sets the [class of the device](/integrations/sensor#device-class), changing the device state and icon that is displayed on the frontend. + required: false + type: string +state_class: + description: The [state_class](https://developers.home-assistant.io/docs/core/entity/sensor#available-state-classes) of the sensor. required: false type: string value_template: diff --git a/source/_integrations/switch.rest.markdown b/source/_integrations/switch.rest.markdown index 1457f6986ad..87784976f55 100644 --- a/source/_integrations/switch.rest.markdown +++ b/source/_integrations/switch.rest.markdown @@ -40,6 +40,10 @@ name: required: false type: string default: REST Switch +device_class: + description: Sets the [class of the device](/integrations/switch/#device-class), changing the device state and icon that is displayed on the frontend. + required: false + type: string timeout: description: Timeout for the request. required: false