Comments (3)
my fix would be:
def debug_data(serial_data):
if not debug is True:
return
if not serial_data is None:
if debug_level > 0:
data_len = len(serial_data)
if data_len == 2 and serial_data[0] == "07" and serial_data[1] == "f3":
print(
"Recieved an ack packet: {0} {1}".format(serial_data[0], serial_data[1])
)
else:
print("Data length : {0}".format(len(serial_data)))
print("Ack : {0} {1}".format(serial_data[0], serial_data[1]))
print("Start : {0} {1}".format(serial_data[2], serial_data[3]))
print("Command : {0} {1}".format(serial_data[4], serial_data[5]))
print(
"Nr data bytes : {0} (integer {1})".format(
serial_data[6], int(serial_data[6], 16)
)
)
n = 1
while n <= int(serial_data[6], 16):
print(
"Data byte {0} : Hex: {1}, Int: {2}, Array #: {3}".format(
n, serial_data[n + 6], int(serial_data[n + 6], 16), n + 6
)
)
n += 1
print("Checksum : {0}".format(serial_data[-2]))
print("End : {0} {1}".format(serial_data[-2], serial_data[-1]))
if debug_level > 1:
n = 0
while n < data_len:
print("serial_data {0} : {1}".format(n, serial_data[n]))
n += 1
else:
print(f"serial_data ({serial_data}) is empty")`
from whr_930.
Thank you for this report. Would you like to make a pull request for it?
from whr_930.
See
from whr_930.
Related Issues (20)
- UnboundLocalError: local variable 'EnthalpyPresent' referenced before assignment HOT 1
- WHR 930 Basic model doesn't support all commands HOT 2
- Q: is there a way to install this module on Hasio? (the os) HOT 4
- Error in HA wtw: !include includes/wtw.yaml HOT 2
- Speed 100% HOT 3
- Question HOT 1
- Home Assistant has changed MQTT Fans HOT 2
- few questions HOT 2
- question about custom:wtw-card
- Problem installing on RPi4 HA HOT 3
- Lovelace error: Custom element doesn't exist: wtw-card. HOT 9
- MQTT entity naming HOT 4
- Error in calculation of fan speed HOT 1
- Filter Status HOT 4
- Unable to set sensor.wtw_comfort_temperature HOT 1
- Warning get_fan_status HOT 1
- get_status type wrong HOT 1
- get_operating_hours could not get serial data HOT 9
- ValueError: invalid literal for int() with base 10: 'a0' HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from whr_930.