From 117e7a16abf87511957193a161b373fc06b0fad6 Mon Sep 17 00:00:00 2001 From: GrahamJB1 <26122648+GrahamJB1@users.noreply.github.com> Date: Sun, 22 Jan 2023 00:58:54 +0000 Subject: [PATCH 1/4] update unique_id for slaves. Add to sensor min_value, max_value, zero_suppress --- source/_integrations/modbus.markdown | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/source/_integrations/modbus.markdown b/source/_integrations/modbus.markdown index 3b6ad8720792..763fc5688cea 100644 --- a/source/_integrations/modbus.markdown +++ b/source/_integrations/modbus.markdown @@ -268,7 +268,7 @@ slave: type: integer default: 0 unique_id: - description: An ID that uniquely identifies this sensor. If two sensors have the same unique ID, Home Assistant will raise an exception. + description: An ID that uniquely identifies this sensor. Slaves will be given a unique_id of <>_<>. If two sensors have the same unique ID, Home Assistant will raise an exception. required: false type: string {% endconfiguration %} @@ -375,7 +375,7 @@ binary_sensors: default: coil type: string unique_id: - description: An ID that uniquely identifies this sensor. If two sensors have the same unique ID, Home Assistant will raise an exception. + description: An ID that uniquely identifies this sensor. Slaves will be given a unique_id of <>_<>. If two sensors have the same unique ID, Home Assistant will raise an exception. required: false type: string slave_count: @@ -993,12 +993,24 @@ sensors: description: Unit to attach to value. required: false type: string + min_value: + description: The minimum allowed value of a sensor. If value < min_value --> min_value + required: false + type: integer or float + max_value: + description: The maximum allowed value of a sensor. If value > max_value --> max_value + required: false + type: integer or float + zero_suppress: + description: Suppress values close to zero. If -zero_suppress < value < +zero_suppress --> 0 + required: false + type: integer or float 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 unique_id: - description: An ID that uniquely identifies this sensor. If two sensors have the same unique ID, Home Assistant will raise an exception. + description: An ID that uniquely identifies this sensor. Slaves will be given a unique_id of <>_<>. If two sensors have the same unique ID, Home Assistant will raise an exception. required: false type: string slave_count: From ed6fd3f9dd3bc2c653e1833372a7611c183bd01f Mon Sep 17 00:00:00 2001 From: GrahamJB1 <26122648+GrahamJB1@users.noreply.github.com> Date: Sun, 22 Jan 2023 01:02:39 +0000 Subject: [PATCH 2/4] Update modbus.markdown --- source/_integrations/modbus.markdown | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/_integrations/modbus.markdown b/source/_integrations/modbus.markdown index 763fc5688cea..fe5d23b8e656 100644 --- a/source/_integrations/modbus.markdown +++ b/source/_integrations/modbus.markdown @@ -996,15 +996,15 @@ sensors: min_value: description: The minimum allowed value of a sensor. If value < min_value --> min_value required: false - type: integer or float + type: number max_value: description: The maximum allowed value of a sensor. If value > max_value --> max_value required: false - type: integer or float + type: number zero_suppress: description: Suppress values close to zero. If -zero_suppress < value < +zero_suppress --> 0 required: false - type: integer or float + type: number state_class: description: The [state_class](https://developers.home-assistant.io/docs/core/entity/sensor#available-state-classes) of the sensor. required: false From f7f3b0c0c7634975c33dc63d9c61d6aa84caad2b Mon Sep 17 00:00:00 2001 From: GrahamJB1 <26122648+GrahamJB1@users.noreply.github.com> Date: Sun, 22 Jan 2023 01:07:52 +0000 Subject: [PATCH 3/4] Update modbus.markdown --- source/_integrations/modbus.markdown | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/source/_integrations/modbus.markdown b/source/_integrations/modbus.markdown index fe5d23b8e656..75bc56f8bea8 100644 --- a/source/_integrations/modbus.markdown +++ b/source/_integrations/modbus.markdown @@ -994,17 +994,17 @@ sensors: required: false type: string min_value: - description: The minimum allowed value of a sensor. If value < min_value --> min_value + description: The minimum allowed value of a sensor. If value < min_value --> min_value. Can be float or integer required: false - type: number + type: float max_value: - description: The maximum allowed value of a sensor. If value > max_value --> max_value + description: The maximum allowed value of a sensor. If value > max_value --> max_value. Can be float or integer required: false - type: number + type: float zero_suppress: - description: Suppress values close to zero. If -zero_suppress < value < +zero_suppress --> 0 + description: Suppress values close to zero. If -zero_suppress < value < +zero_suppress --> 0. Can be float or integer required: false - type: number + type: float state_class: description: The [state_class](https://developers.home-assistant.io/docs/core/entity/sensor#available-state-classes) of the sensor. required: false From cf4e8be27bff67ef7e7643a0e5c4b556f0272824 Mon Sep 17 00:00:00 2001 From: GrahamJB1 <26122648+GrahamJB1@users.noreply.github.com> Date: Sun, 22 Jan 2023 01:13:43 +0000 Subject: [PATCH 4/4] Update modbus.markdown --- source/_integrations/modbus.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/_integrations/modbus.markdown b/source/_integrations/modbus.markdown index 75bc56f8bea8..8235f2d6f24e 100644 --- a/source/_integrations/modbus.markdown +++ b/source/_integrations/modbus.markdown @@ -1002,7 +1002,7 @@ sensors: required: false type: float zero_suppress: - description: Suppress values close to zero. If -zero_suppress < value < +zero_suppress --> 0. Can be float or integer + description: Suppress values close to zero. If -zero_suppress <= value <= +zero_suppress --> 0. Can be float or integer required: false type: float state_class: