Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for RainSensor (io:SomfyRainIOSystemSensor) #102

Closed
ljscz opened this issue Jul 5, 2020 · 3 comments · Fixed by #84
Closed

Add support for RainSensor (io:SomfyRainIOSystemSensor) #102

ljscz opened this issue Jul 5, 2020 · 3 comments · Fixed by #84

Comments

@ljscz
Copy link

ljscz commented Jul 5, 2020

Device information
Rain sensor with detected, notDetected states which is used to control covers.

Device details

 {
         "creationTime":1579704509000,
         "lastUpdateTime":1579704509000,
         "label":"dest",
         "shortcut":false,
         "controllableName":"io:SomfyRainIOSystemSensor",
         "definition":{
            "commands":[

            ],
            "states":[
               {
                  "values":[
                     "good",
                     "low",
                     "normal",
                     "verylow"
                  ],
                  "type":"DiscreteState",
                  "qualifiedName":"core:DiscreteRSSILevelState"
               },
               {
                  "type":"ContinuousState",
                  "qualifiedName":"core:RSSILevelState"
               },
               {
                  "values":[
                     "detected",
                     "notDetected"
                  ],
                  "type":"DiscreteState",
                  "qualifiedName":"core:RainState"
               },
               {
                  "values":[
                     "dead",
                     "lowBattery",
                     "maintenanceRequired",
                     "noDefect"
                  ],
                  "type":"DiscreteState",
                  "qualifiedName":"core:SensorDefectState"
               },
               {
                  "values":[
                     "available",
                     "unavailable"
                  ],
                  "type":"DiscreteState",
                  "qualifiedName":"core:StatusState"
               }
            ],
            "dataProperties":[

            ],
            "widgetName":"RainSensor",
            "uiClass":"RainSensor",
            "qualifiedName":"io:SomfyRainIOSystemSensor",
            "type":"SENSOR"
         },
         "states":[
            {
               "name":"core:RainState",
               "type":3,
               "value":"notDetected"
            },
            {
               "name":"core:StatusState",
               "type":3,
               "value":"available"
            },
            {
               "name":"core:DiscreteRSSILevelState",
               "type":3,
               "value":"good"
            },
            {
               "name":"core:RSSILevelState",
               "type":2,
               "value":88.0
            }
         ],
         "available":true,
         "enabled":true,
         "placeOID":"---",
         "widget":"RainSensor",
         "type":2,
         "oid":"--",
         "uiClass":"RainSensor"
      }
@iMicknl
Copy link
Owner

iMicknl commented Jul 5, 2020

Thanks for reporting @ljscz! Support for the rain sensor is on its way and will be added after #84 is merged.

If you would like to beta test this functionality, you can download this feature https://github.com/iMicknl/ha-tahoma/archive/refactor_sensor.zip and place this folder in your custom_components folder.

@iMicknl iMicknl linked a pull request Jul 5, 2020 that will close this issue
@ljscz
Copy link
Author

ljscz commented Jul 6, 2020

@iMicknl Thank you for the fast change!

I had to change the sensor type in const.py to

"RainSensor": "binary_sensor",

Without this the sensor was reported as sensor.xxxx and without state after the change it works perfectly.

@iMicknl iMicknl changed the title Add support for RainSensor ([io:SomfyRainIOSystemSensor]) Add support for RainSensor (io:SomfyRainIOSystemSensor) Jul 6, 2020
@iMicknl
Copy link
Owner

iMicknl commented Jul 6, 2020

@ljscz good spot, I fixed it now in the latest version. #84 should be published soon, adding support for multiple sensors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants