claudegel / sinope-130

Neviweb130 custom component for Home Assistant to manage devices connected via a GT130 and wifi devices from Sinopé
GNU General Public License v3.0
63 stars 13 forks source link

Impossible de modifier le rétroéclairage via HomeAssistant #190

Closed bluecandy101 closed 8 months ago

bluecandy101 commented 8 months ago

Bonjour,

J'ai essayé de modifier le rétroéclairage via Home assistant.

Voici mon code :

alias: Btn Chevet Long
description: ""
trigger:
  - platform: device
    device_id: d6e8d69ee526ee20e77858e9610c72e4
    domain: homekit_controller
    type: button1
    subtype: long_press
condition: []
action:
  - service: neviweb130.set_backlight
    data:
      entity_id: "climate.neviweb130_climate_th1123wf"
      type: "wifi"
      backlightAdaptive: "auto"
mode: single

Voici le résultat du log :

2023-11-14 17:18:49.678 DEBUG (SyncWorker_3) [custom_components.neviweb130] backlight.data = {'backlightAutoDim': 'onUserActive'}
2023-11-14 17:18:49.911 DEBUG (SyncWorker_3) [custom_components.neviweb130] Data = {'backlightAutoDim': 'onUserActive'}
2023-11-14 17:18:49.911 DEBUG (SyncWorker_3) [custom_components.neviweb130] Request response = 200
2023-11-14 17:18:49.912 DEBUG (SyncWorker_3) [custom_components.neviweb130] Json Data received= {'error': {'code': 'VALINVLD', 'data': {'value': 'onUserActive', 'name': 'backlightAutoDim'}}}
2023-11-14 17:18:49.912 DEBUG (SyncWorker_3) [custom_components.neviweb130] Content = b'{"error":{"code":"VALINVLD","data":{"value":"onUserActive","name":"backlightAutoDim"}}}'
2023-11-14 17:18:49.912 DEBUG (SyncWorker_3) [custom_components.neviweb130] Text = {"error":{"code":"VALINVLD","data":{"value":"onUserActive","name":"backlightAutoDim"}}}
2023-11-14 17:18:49.912 DEBUG (SyncWorker_3) [custom_components.neviweb130] Service error received: {'error': {'code': 'VALINVLD', 'data': {'value': 'onUserActive', 'name': 'backlightAutoDim'}}}, resending request 2
2023-11-14 17:18:50.181 DEBUG (SyncWorker_3) [custom_components.neviweb130] Data = {'backlightAutoDim': 'onUserActive'}
2023-11-14 17:18:50.181 DEBUG (SyncWorker_3) [custom_components.neviweb130] Request response = 200
2023-11-14 17:18:50.181 DEBUG (SyncWorker_3) [custom_components.neviweb130] Json Data received= {'error': {'code': 'VALINVLD', 'data': {'value': 'onUserActive', 'name': 'backlightAutoDim'}}}
2023-11-14 17:18:50.182 DEBUG (SyncWorker_3) [custom_components.neviweb130] Content = b'{"error":{"code":"VALINVLD","data":{"value":"onUserActive","name":"backlightAutoDim"}}}'
2023-11-14 17:18:50.182 DEBUG (SyncWorker_3) [custom_components.neviweb130] Text = {"error":{"code":"VALINVLD","data":{"value":"onUserActive","name":"backlightAutoDim"}}}
2023-11-14 17:18:50.182 DEBUG (SyncWorker_3) [custom_components.neviweb130] Service error received: {'error': {'code': 'VALINVLD', 'data': {'value': 'onUserActive', 'name': 'backlightAutoDim'}}}, resending request 3
2023-11-14 17:18:50.421 DEBUG (SyncWorker_3) [custom_components.neviweb130] Data = {'backlightAutoDim': 'onUserActive'}
2023-11-14 17:18:50.421 DEBUG (SyncWorker_3) [custom_components.neviweb130] Request response = 200
2023-11-14 17:18:50.421 DEBUG (SyncWorker_3) [custom_components.neviweb130] Json Data received= {'error': {'code': 'VALINVLD', 'data': {'value': 'onUserActive', 'name': 'backlightAutoDim'}}}
2023-11-14 17:18:50.421 DEBUG (SyncWorker_3) [custom_components.neviweb130] Content = b'{"error":{"code":"VALINVLD","data":{"value":"onUserActive","name":"backlightAutoDim"}}}'
2023-11-14 17:18:50.421 DEBUG (SyncWorker_3) [custom_components.neviweb130] Text = {"error":{"code":"VALINVLD","data":{"value":"onUserActive","name":"backlightAutoDim"}}}
2023-11-14 17:18:50.422 DEBUG (SyncWorker_3) [custom_components.neviweb130] Service error received: {'error': {'code': 'VALINVLD', 'data': {'value': 'onUserActive', 'name': 'backlightAutoDim'}}}, resending request 4
2023-11-14 17:18:50.428 DEBUG (SyncWorker_4) [custom_components.neviweb130.climate] Updated attributes for neviweb130 climate MN-Bureau: ['roomSetpoint', 'outputPercentDisplay', 'roomTemperature', 'roomSetpointMin', 'roomSetpointMax', 'roomTemperatureDisplay', 'timeFormat', 'temperatureFormat', 'drStatus', 'drSetpoint', 'loadConnected', 'loadWattOutput1', 'loadWatt', 'wifiRssi', 'keyboardLock', 'config2ndDisplay', 'setpointMode', 'occupancyMode', 'backlightAutoDim', 'earlyStartCfg', 'roomSetpointAway', 'config2ndDisplay', 'rssi']
2023-11-14 17:18:53.128 DEBUG (SyncWorker_4) [custom_components.neviweb130.climate] Updating neviweb130 climate MN-Bureau (2.7 sec): {'roomSetpoint': 20, 'outputPercentDisplay': {'percent': 0, 'sourceType': 'heating'}, 'roomTemperature': {'error': None, 'value': 22.32}, 'roomSetpointMin': 5, 'roomSetpointMax': 30, 'roomTemperatureDisplay': {'status': 'on', 'value': 22.5}, 'timeFormat': '24h', 'temperatureFormat': 'celsius', 'drStatus': {'drActive': 'off', 'optOut': 'off', 'setpoint': 'off', 'powerAbsolute': 'off', 'powerRelative': 'off', 'onOff': 'off'}, 'drSetpoint': {'status': 'off', 'value': None}, 'loadWattOutput1': 1290, 'loadWatt': 1290, 'wifiRssi': -44, 'keyboardLock': 'unlock', 'config2ndDisplay': 'default', 'setpointMode': 'manual', 'occupancyMode': 'none', 'backlightAutoDim': 'alwaysOn', 'earlyStartCfg': 'off', 'roomSetpointAway': 15}

Il semble y avoir un problème.

Merci de m'aider avec cela !

claudegel commented 8 months ago

C'est la valeur onUserActive qui a changé pour onUserAction J'ai créé une branche wifi avec la correction dans le fichier climate.py https://github.com/claudegel/sinope-130/tree/wifi/custom_components/neviweb130 Simplement remplacer le fichier climate.py dans config/custom_components/neviweb130 avec celui dans le lien ci-dessus

bluecandy101 commented 8 months ago

Cela fonctionne très bien. Je peux utiliser 'on' ou 'auto. Super, merci !

claudegel commented 8 months ago

Ok je vais faire un release. Merci de m'avoir rapporter ce bug