wiserHomeAssistantPlatform icon indicating copy to clipboard operation
wiserHomeAssistantPlatform copied to clipboard

Devhubv2lgo

Open LGO44 opened this issue 1 year ago • 7 comments

This is the branch I use to my tests.

Questions:

  1. The switch "switch.wiser_shutter_salle_salon_jardin_respect_summer_comfort" has been created, it's state isn't updated...

exemple: I turn_on the switch, it update in the Hub but the switch states return to off after a few seconds .... logs: _2023-11-16 14:37:37.226 DEBUG (MainThread) [aioWiserHeatAPI] Sending command to url: http://{}:{}/data/v2/domain/Shutter/1 with parameters {'RespectSummerComfort': 'true'} 2023-11-16 14:37:37.285 DEBUG (MainThread) [aioWiserHeatAPI] Wiser shutter- set_respect_summer_comfort command successful 2023-11-16 14:37:37.488 INFO (MainThread) [custom_components.wiser.coordinator] Hub update completed for WiserHeat045FDD 2023-11-16 14:37:38.679 DEBUG (MainThread) [aioWiserHeatAPI] Sending command to url: http://{}:{}/data/v2/domain/Shutter/1 with parameters {'RespectSummerComfort': 'false'} 2023-11-16 14:37:38.811 DEBUG (MainThread) [aioWiserHeatAPI] Wiser shutter- set_respect_summer_comfort command successful _

  1. In number.py I cannot fixed an issue on the Add lift, tilt position for any shutter summer comfort position for shutter in data.wiserhub.devices.shutters.all:

     wiser_numbers.extend(
         [
             #WiserSummerComfortLiftNumber(data,shutter,"summer_comfort_lift"),
             #WiserSummerComfortTiltNumber(shutter,  "summer_comfort_tilt")
         ],
     )    
    

LGO44 avatar Nov 16 '23 13:11 LGO44

  1. I have seen this (mainly on plugs) where the integration updates after setting a switch too quicky and the state is not yet updated on the hub. For testing, add a delay parameter to force_hub_update request. Ie self.force_hub_update(1) and see if that works.
  2. What is the issue?

msp1974 avatar Nov 16 '23 17:11 msp1974

I'm sorry , I close the PR without meaning to. Point 1 :

  1. I have seen this (mainly on plugs) where the integration updates after setting a switch too quicky and the state is not yet updated on the hub. For testing, add a delay parameter to force_hub_update request. Ie self.force_hub_update(1) and see if that works.

I have put "self.force_hub_update(1) ", "self.force_hub_update(5) " ,"self.force_hub_update(20)" no result.

My test: test 1: Initial : on the wiser home application the shutter doesn't "Respect_summer_comfort" on HA the switch is displayed off

Step 1 : I turn on the switch, in the wiser Home the switch is ON, in HA the switch is ON and a few seconds after it displayed OFF but it's is On in the Wiser home app.

test 2: Initial : on the wiser home application the shutter does "Respect_summer_comfort" (is ON) on HA the switch is displayed off

Step 1 : I turn on the switch, in the wiser Home the switch stay ON, in HA the switch is ON and a few seconds after it displayed OFF but it's is On in the Wiser home app. Step 2 : if I turn_off the switch , during the time that it's displayed On on HA then the switch is turned off in the wiser home app.

I have the same behavior with another "switch summer_discomfort_prevention"

I think that this is due to a bug in the definition of the switch but I don't see it

LGO44 avatar Nov 16 '23 20:11 LGO44

2 What is the issue?

I tried to create a class WiserSummerComfortLiftNumber(CoordinatorEntity, NumberEntity): but I can't configure the definition either based on class WiserFloorTempSensorNumber or class WiserDiscomfortOutdoorTempNumber(CoordinatorEntity, NumberEntity):

i'm a bit lost

LGO44 avatar Nov 16 '23 21:11 LGO44

Ok. For issue 1.

You have this in switch.py for WiserShutterSummerComfortSwitch.

self._is_on = True if self._shutter.respect_summer_comfort == "off" else False

However aiowiserheat api returns True or False for respect_summer_comfort not on/off. Not sure whether api is wrong or the line above but they need to match value types.

msp1974 avatar Nov 17 '23 00:11 msp1974

Ok. For issue 1.

You have this in switch.py for WiserShutterSummerComfortSwitch.

self._is_on = True if self._shutter.respect_summer_comfort == "off" else False

However aiowiserheat api returns True or False for respect_summer_comfort not on/off. Not sure whether api is wrong or the line above but they need to match value types. @msp1974 Thanks a lot. FIXED! You are right. I think I could have stayed in front of the code for years without finding the cause of the issue

LGO44 avatar Nov 17 '23 09:11 LGO44

@msp1974 As I'm a beginner on github I've also mase a pull request on my repository https://github.com/LGO44/aioWiserHeatAPI/pull/1 . I don't know how can I upload it in your repository.

LGO44 avatar Nov 17 '23 11:11 LGO44

@msp1974 how can we solve the conflicts?

LGO44 avatar Dec 04 '23 14:12 LGO44

Replaced by #427

msp1974 avatar Mar 05 '24 16:03 msp1974