From 180b64ea8caf0b96b22e24061ccbab809315bedc Mon Sep 17 00:00:00 2001 From: szewcu Date: Sun, 19 Oct 2025 18:48:32 +0200 Subject: [PATCH] fix gdk101 fw version reporting Signed-off-by: szewcu --- content/components/sensor/gdk101.md | 55 ++++++++++++++++++++++++++--- 1 file changed, 50 insertions(+), 5 deletions(-) diff --git a/content/components/sensor/gdk101.md b/content/components/sensor/gdk101.md index aa0de91501..8fce2583ba 100644 --- a/content/components/sensor/gdk101.md +++ b/content/components/sensor/gdk101.md @@ -76,13 +76,10 @@ A sensor platform to radiation data Configuration variables: -- **radiation_dose_per_1m** (**Required**): Radiation average dose per 1 minute. +- **radiation_dose_per_1m** (*Optional*): Radiation average dose per 1 minute. All options from [Sensor](#config-sensor). -- **radiation_dose_per_10m** (**Required**): Radiation average dose per 10 minutes. - All options from [Sensor](#config-sensor). - -- **version** (**Required**): Fimware version of the module. +- **radiation_dose_per_10m** (*Optional*): Radiation average dose per 10 minutes. All options from [Sensor](#config-sensor). - **status** (*Optional*): Sensor status. @@ -108,6 +105,54 @@ Configuration variables: - **vibrations** (**Required**): Vibration status. All options from [Binary Sensor](#config-binary_sensor). +## Text Sensor + +```yaml +# Example configuration entry +text_sensor: + - platform: gdk101 + version: + name: "GDK101 FW Version" +``` + +Text sensor that report firmware version of the sensor. + +Configuration variables: + +- **version** (*Optional*): Firmware version of the module. + All options from [Text Sensor](#config-text_sensor). + +## Sensor Status + +Sensor status indicates how long sensor work which indicates accuracy of the measurements + +| 0 | Power On ~ 10sec | +| 1 | 10sec to 10min | +| 2 | After 10 min | + +This can be represented by a template text sensor such as below: + +```yaml +sensor: + - platform: gdk101 + status: + name: "GDK101 status" + id: gdk101_status + - platform: template + name: "GDK101 Status Description" + lambda: |- + int status = int(id(gdk101_status).state); + if (status == 0) { + return {"Powered On"}; + } else if (status == 1) { + return {"Settling"}; + } else if (status == 2) { + return {"Settled"}; + } else { + return {"Unknown status"}; + } +``` + ## See Also - [Sensor Filters](#sensor-filters)