Uwaga! ciemny test - nie mam teraz fizycznego dostępu do modułu.
wizualizacja działa. nazwa modułu -> sypialnia_rgbw
2019-12-09 12:22:35 DEBUG (SyncWorker_16) [custom_components.extalife.light] white value: {}
2019-12-09 12:22:35 DEBUG (SyncWorker_16) [custom_components.extalife.light] 'mode_val' value: FF0000FF
2019-12-09 12:22:35 DEBUG (SyncWorker_16) [custom_components.extalife.light] turn_on for entity: light.sypialnia_rgbw(10-1). mode_val_hex: None
2019-12-09 12:22:40 DEBUG (SyncWorker_7) [custom_components.extalife] Executing EFC-01 status polling....
2019-12-09 12:22:40 DEBUG (SyncWorker_7) [custom_components.extalife.pyextalife] TCP command to execute: b'{"command": 37, "data": null}\x03'
2019-12-09 12:22:40 DEBUG (SyncWorker_7) [custom_components.extalife.pyextalife] resp_js: [{'command': 37, 'status': 'searching', 'data': {'devices': [{'id': 3, 'is_powered': False, 'is_paired': False, 'set_remove_sensor': False, 'device': 1, 'type': 10, 'serial': 655520, 'valid_software': True, 'response_time': 0, 'is_timeout': False, 'exta_free_device': False, 'state': [{'alias': 'sypialnia glowne', 'channel': 1, 'icon': 13, 'is_timeout': False, 'fav': None, 'power': 0, 'last_dir': None, 'value': None}]}]}, 'page': 0}]
2019-12-09 12:22:40 DEBUG (SyncWorker_6) [custom_components.extalife.light] white value: {}
2019-12-09 12:22:40 DEBUG (SyncWorker_6) [custom_components.extalife.light] 'mode_val' value: FF0000FF
2019-12-09 12:22:40 DEBUG (SyncWorker_6) [custom_components.extalife.light] turn_on for entity: light.sypialnia_rgbw(10-1). mode_val_hex: FF0000FF
2019-12-09 12:22:40 DEBUG (SyncWorker_6) [custom_components.extalife] Executing action TURN_ON on channel 10-1, params: {'value': 100, 'mode_val': 255, 'mode': 0}
2019-12-09 12:22:40 DEBUG (SyncWorker_6) [custom_components.extalife.pyextalife] TCP command to execute: b'{"command": 20, "data": {"id": 10, "channel": 1, "state": 1, "value": 100, "mode_val": 255, "mode": 0}}\x03'
2019-12-09 12:22:40 DEBUG (SyncWorker_6) [custom_components.extalife.pyextalife] resp_js: [{'command': 20, 'data': {'id': 10, 'channel': 1, 'state': True, 'value': 100, 'mode': 0, 'mode_val': 255}, 'status': 'notification'}]
2019-12-09 12:22:40 DEBUG (SyncWorker_6) [custom_components.extalife.pyextalife] resp_js: [{'command': 20, 'data': {'id': 10, 'channel': 1, 'state': True, 'value': 100, 'mode': 0, 'mode_val': 255}, 'status': 'notification'}, {'command': 20, 'status': 'success', 'data': None}]
2019-12-09 12:22:40 DEBUG (SyncWorker_6) [custom_components.extalife.pyextalife] JSON response for command 20: [{'command': 20, 'data': {'id': 10, 'channel': 1, 'state': True, 'value': 100, 'mode': 0, 'mode_val': 255}, 'status': 'notification'}, {'command': 20, 'status': 'success', 'data': None}]
2019-12-09 12:22:40 DEBUG (MainThread) [custom_components.extalife.light] Supported flags: 145
2019-12-09 12:22:40 DEBUG (Thread-2) [custom_components.extalife.pyextalife] resp_js (intermediary): [{'command': 20, 'data': {'id': 10, 'channel': 1, 'state': True, 'value': 100, 'mode': 0, 'mode_val': 255}, 'status': 'notification'}]
2019-12-09 12:22:40 DEBUG (MainThread) [custom_components.extalife.light] Supported flags: 145
2019-12-09 12:22:40 DEBUG (Thread-2) [custom_components.extalife] Received msg from Notification Listener thread: {'command': 20, 'data': {'id': 10, 'channel': 1, 'state': True, 'value': 100, 'mode': 0, 'mode_val': 255}, 'status': 'notification'}
2019-12-09 12:22:40 DEBUG (MainThread) [custom_components.extalife] State update notification callback for entity id: light.sypialnia_rgbw, data: {'id': 10, 'channel': 1, 'state': True, 'value': 100, 'mode': 0, 'mode_val': 255}
2019-12-09 12:22:40 DEBUG (SyncWorker_0) [custom_components.extalife.light] Data update callback for entity: light.sypialnia_rgbw(10-1). mode_val_hex: FF. mode_val: 255
2019-12-09 12:22:40 DEBUG (MainThread) [custom_components.extalife.light] Supported flags: 145
2019-12-09 12:22:40 DEBUG (MainThread) [custom_components.extalife.light] Supported flags: 145
2019-12-09 12:22:44 DEBUG (SyncWorker_1) [custom_components.extalife.light] white value: {'hs_color': (240.0, 100.0)}
2019-12-09 12:22:44 DEBUG (SyncWorker_1) [custom_components.extalife.light] 'mode_val' value: 255
2019-12-09 12:22:44 DEBUG (SyncWorker_1) [custom_components.extalife.light] turn_on for entity: light.sypialnia_rgbw(10-1). mode_val_hex: FF
2019-12-09 12:22:44 DEBUG (SyncWorker_1) [custom_components.extalife] Executing action TURN_ON on channel 10-1, params: {'value': 100, 'mode_val': 0, 'mode': 0}
2019-12-09 12:22:44 DEBUG (SyncWorker_1) [custom_components.extalife.pyextalife] TCP command to execute: b'{"command": 20, "data": {"id": 10, "channel": 1, "state": 1, "value": 100, "mode_val": 0, "mode": 0}}\x03'
2019-12-09 12:22:44 DEBUG (SyncWorker_1) [custom_components.extalife.pyextalife] resp_js: [{'command': 20, 'data': {'id': 10, 'channel': 1, 'state': True, 'value': 100, 'mode': 0, 'mode_val': 0}, 'status': 'notification'}]
2019-12-09 12:22:44 DEBUG (SyncWorker_1) [custom_components.extalife.pyextalife] resp_js: [{'command': 20, 'data': {'id': 10, 'channel': 1, 'state': True, 'value': 100, 'mode': 0, 'mode_val': 0}, 'status': 'notification'}, {'command': 20, 'status': 'success', 'data': None}]
2019-12-09 12:22:44 DEBUG (Thread-2) [custom_components.extalife.pyextalife] resp_js (intermediary): [{'command': 20, 'data': {'id': 10, 'channel': 1, 'state': True, 'value': 100, 'mode': 0, 'mode_val': 0}, 'status': 'notification'}]
2019-12-09 12:22:44 DEBUG (SyncWorker_1) [custom_components.extalife.pyextalife] JSON response for command 20: [{'command': 20, 'data': {'id': 10, 'channel': 1, 'state': True, 'value': 100, 'mode': 0, 'mode_val': 0}, 'status': 'notification'}, {'command': 20, 'status': 'success', 'data': None}]
2019-12-09 12:22:44 DEBUG (Thread-2) [custom_components.extalife] Received msg from Notification Listener thread: {'command': 20, 'data': {'id': 10, 'channel': 1, 'state': True, 'value': 100, 'mode': 0, 'mode_val': 0}, 'status': 'notification'}
2019-12-09 12:22:44 DEBUG (MainThread) [custom_components.extalife] State update notification callback for entity id: light.sypialnia_rgbw, data: {'id': 10, 'channel': 1, 'state': True, 'value': 100, 'mode': 0, 'mode_val': 0}
2019-12-09 12:22:44 DEBUG (MainThread) [custom_components.extalife.light] Supported flags: 145
2019-12-09 12:22:44 DEBUG (MainThread) [custom_components.extalife.light] Supported flags: 145
2019-12-09 12:22:44 DEBUG (SyncWorker_14) [custom_components.extalife.light] Data update callback for entity: light.sypialnia_rgbw(10-1). mode_val_hex: 0. mode_val: 0
2019-12-09 12:22:44 DEBUG (MainThread) [custom_components.extalife.light] Supported flags: 145
2019-12-09 12:22:44 DEBUG (MainThread) [custom_components.extalife.light] Supported flags: 145
2019-12-09 12:22:46 DEBUG (SyncWorker_12) [custom_components.extalife.light] white value: {'hs_color': (360.0, 100.0)}
2019-12-09 12:22:46 DEBUG (SyncWorker_12) [custom_components.extalife.light] 'mode_val' value: 0
2019-12-09 12:22:46 DEBUG (SyncWorker_12) [custom_components.extalife.light] turn_on for entity: light.sypialnia_rgbw(10-1). mode_val_hex: 0
2019-12-09 12:22:46 DEBUG (SyncWorker_12) [custom_components.extalife] Executing action TURN_ON on channel 10-1, params: {'value': 100, 'mode_val': 0, 'mode': 0}
2019-12-09 12:22:46 DEBUG (SyncWorker_12) [custom_components.extalife.pyextalife] TCP command to execute: b'{"command": 20, "data": {"id": 10, "channel": 1, "state": 1, "value": 100, "mode_val": 0, "mode": 0}}\x03'
2019-12-09 12:22:46 DEBUG (SyncWorker_12) [custom_components.extalife.pyextalife] resp_js: [{'command': 20, 'data': {'id': 10, 'channel': 1, 'state': True, 'value': 100, 'mode': 0, 'mode_val': 0}, 'status': 'notification'}]
2019-12-09 12:22:46 DEBUG (Thread-2) [custom_components.extalife.pyextalife] resp_js (intermediary): [{'command': 20, 'data': {'id': 10, 'channel': 1, 'state': True, 'value': 100, 'mode': 0, 'mode_val': 0}, 'status': 'notification'}]
2019-12-09 12:22:46 DEBUG (Thread-2) [custom_components.extalife] Received msg from Notification Listener thread: {'command': 20, 'data': {'id': 10, 'channel': 1, 'state': True, 'value': 100, 'mode': 0, 'mode_val': 0}, 'status': 'notification'}
2019-12-09 12:22:46 DEBUG (MainThread) [custom_components.extalife] State update notification callback for entity id: light.sypialnia_rgbw, data: {'id': 10, 'channel': 1, 'state': True, 'value': 100, 'mode': 0, 'mode_val': 0}
2019-12-09 12:22:46 DEBUG (SyncWorker_12) [custom_components.extalife.pyextalife] resp_js: [{'command': 20, 'data': {'id': 10, 'channel': 1, 'state': True, 'value': 100, 'mode': 0, 'mode_val': 0}, 'status': 'notification'}, {'command': 20, 'status': 'success', 'data': None}]
2019-12-09 12:22:46 DEBUG (SyncWorker_12) [custom_components.extalife.pyextalife] JSON response for command 20: [{'command': 20, 'data': {'id': 10, 'channel': 1, 'state': True, 'value': 100, 'mode': 0, 'mode_val': 0}, 'status': 'notification'}, {'command': 20, 'status': 'success', 'data': None}]
2019-12-09 12:22:46 DEBUG (MainThread) [custom_components.extalife.light] Supported flags: 145
2019-12-09 12:22:46 DEBUG (MainThread) [custom_components.extalife.light] Supported flags: 145
2019-12-09 12:22:47 DEBUG (SyncWorker_19) [custom_components.extalife.light] white value: {'hs_color': (120.0, 100.0)}
2019-12-09 12:22:47 DEBUG (SyncWorker_19) [custom_components.extalife.light] 'mode_val' value: 0
2019-12-09 12:22:47 DEBUG (SyncWorker_19) [custom_components.extalife.light] turn_on for entity: light.sypialnia_rgbw(10-1). mode_val_hex: 0
2019-12-09 12:22:47 DEBUG (SyncWorker_19) [custom_components.extalife] Executing action TURN_ON on channel 10-1, params: {'value': 100, 'mode_val': 0, 'mode': 0}
2019-12-09 12:22:47 DEBUG (SyncWorker_19) [custom_components.extalife.pyextalife] TCP command to execute: b'{"command": 20, "data": {"id": 10, "channel": 1, "state": 1, "value": 100, "mode_val": 0, "mode": 0}}\x03'
2019-12-09 12:22:47 DEBUG (SyncWorker_19) [custom_components.extalife.pyextalife] resp_js: [{'command': 20, 'data': {'id': 10, 'channel': 1, 'state': True, 'value': 100, 'mode': 0, 'mode_val': 0}, 'status': 'notification'}]
2019-12-09 12:22:47 DEBUG (SyncWorker_19) [custom_components.extalife.pyextalife] resp_js: [{'command': 20, 'data': {'id': 10, 'channel': 1, 'state': True, 'value': 100, 'mode': 0, 'mode_val': 0}, 'status': 'notification'}, {'command': 20, 'status': 'success', 'data': None}]
2019-12-09 12:22:47 DEBUG (SyncWorker_19) [custom_components.extalife.pyextalife] JSON response for command 20: [{'command': 20, 'data': {'id': 10, 'channel': 1, 'state': True, 'value': 100, 'mode': 0, 'mode_val': 0}, 'status': 'notification'}, {'command': 20, 'status': 'success', 'data': None}]
2019-12-09 12:22:47 DEBUG (MainThread) [custom_components.extalife.light] Supported flags: 145
2019-12-09 12:22:47 DEBUG (MainThread) [custom_components.extalife.light] Supported flags: 145
2019-12-09 12:22:48 DEBUG (Thread-2) [custom_components.extalife.pyextalife] resp_js (intermediary): [{'command': 20, 'data': {'id': 10, 'channel': 1, 'state': True, 'value': 100, 'mode': 0, 'mode_val': 0}, 'status': 'notification'}]
2019-12-09 12:22:48 DEBUG (Thread-2) [custom_components.extalife] Received msg from Notification Listener thread: {'command': 20, 'data': {'id': 10, 'channel': 1, 'state': True, 'value': 100, 'mode': 0, 'mode_val': 0}, 'status': 'notification'}
2019-12-09 12:22:49 DEBUG (MainThread) [custom_components.extalife] State update notification callback for entity id: light.sypialnia_rgbw, data: {'id': 10, 'channel': 1, 'state': True, 'value': 100, 'mode': 0, 'mode_val': 0}
2019-12-09 12:22:50 DEBUG (SyncWorker_10) [custom_components.extalife.light] white value: {'hs_color': (270.0, 0.0)}
2019-12-09 12:22:50 DEBUG (SyncWorker_10) [custom_components.extalife.light] 'mode_val' value: 0
2019-12-09 12:22:50 DEBUG (SyncWorker_10) [custom_components.extalife.light] turn_on for entity: light.sypialnia_rgbw(10-1). mode_val_hex: 0
2019-12-09 12:22:50 DEBUG (SyncWorker_10) [custom_components.extalife] Executing action TURN_ON on channel 10-1, params: {'value': 100, 'mode_val': 0, 'mode': 0}
2019-12-09 12:22:50 DEBUG (SyncWorker_10) [custom_components.extalife.pyextalife] TCP command to execute: b'{"command": 20, "data": {"id": 10, "channel": 1, "state": 1, "value": 100, "mode_val": 0, "mode": 0}}\x03'
2019-12-09 12:22:50 DEBUG (SyncWorker_10) [custom_components.extalife.pyextalife] resp_js: [{'command': 20, 'data': {'id': 10, 'channel': 1, 'state': True, 'value': 100, 'mode': 0, 'mode_val': 0}, 'status': 'notification'}]
2019-12-09 12:22:50 DEBUG (Thread-2) [custom_components.extalife.pyextalife] resp_js (intermediary): [{'command': 20, 'data': {'id': 10, 'channel': 1, 'state': True, 'value': 100, 'mode': 0, 'mode_val': 0}, 'status': 'notification'}]
2019-12-09 12:22:50 DEBUG (Thread-2) [custom_components.extalife] Received msg from Notification Listener thread: {'command': 20, 'data': {'id': 10, 'channel': 1, 'state': True, 'value': 100, 'mode': 0, 'mode_val': 0}, 'status': 'notification'}
2019-12-09 12:22:50 DEBUG (SyncWorker_10) [custom_components.extalife.pyextalife] resp_js: [{'command': 20, 'data': {'id': 10, 'channel': 1, 'state': True, 'value': 100, 'mode': 0, 'mode_val': 0}, 'status': 'notification'}, {'command': 20, 'status': 'success', 'data': None}]
2019-12-09 12:22:50 DEBUG (SyncWorker_10) [custom_components.extalife.pyextalife] JSON response for command 20: [{'command': 20, 'data': {'id': 10, 'channel': 1, 'state': True, 'value': 100, 'mode': 0, 'mode_val': 0}, 'status': 'notification'}, {'command': 20, 'status': 'success', 'data': None}]
2019-12-09 12:22:50 DEBUG (MainThread) [custom_components.extalife] State update notification callback for entity id: light.sypialnia_rgbw, data: {'id': 10, 'channel': 1, 'state': True, 'value': 100, 'mode': 0, 'mode_val': 0}
2019-12-09 12:22:50 DEBUG (MainThread) [custom_components.extalife.light] Supported flags: 145
2019-12-09 12:22:50 DEBUG (MainThread) [custom_components.extalife.light] Supported flags: 145
2019-12-09 12:23:41 DEBUG (SyncWorker_3) [custom_components.extalife] Executing EFC-01 status polling....
2019-12-09 12:23:41 DEBUG (SyncWorker_3) [custom_components.extalife.pyextalife] TCP command to execute: b'{"command": 37, "data": null}\x03'
2019-12-09 12:23:41 DEBUG (SyncWorker_3) [custom_components.extalife.pyextalife] resp_js: [{'command': 37, 'status': 'searching', 'data': {'devices': [{'id': 3, 'is_powered': False, 'is_paired': False, 'set_remove_sensor': False, 'device': 1, 'type': 10, 'serial': 655520, 'valid_software': True, 'response_time': 0, 'is_timeout': False, 'exta_free_device': False, 'state': [{'alias': 'sypialnia glowne', 'channel': 1, 'icon': 13, 'is_timeout': False, 'fav': None, 'power': 0, 'last_dir': None, 'value': None}]}]}, 'page': 0}]
i pojawiła się błąd skryptu
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 564, in async_request_call
await coro
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/extalife/light.py", line 96, in turn_on
w = int(mode_val_hex, 16) & 255 # default
TypeError: int() can't convert non-string with explicit base