Skip to content

Commit

Permalink
fix ewh_cloud errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dentra committed Oct 11, 2022
1 parent a9d128d commit b5550bc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/ewh_cloud/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

def cloud_uid(value) -> list:
"transform cloud uid to cloud key array"
value = f"{int(str(cv.uint32_t(value)))}:06d"
value = f"{int(value):06d}"

parts = [value[i : i + 2] for i in range(0, len(value), 2)]
if len(parts) != 3:
Expand Down
2 changes: 1 addition & 1 deletion components/ewh_cloud/ewh_cloud.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ void EWHCloud::connect() {
if (this->tcp_->connect(this->host_.c_str(), this->port_)) {
this->tcp_->onData(
[](void *arg, AsyncClient *client, void *data, size_t size) {
reinterpret_cast<EWHCloud *>(arg)->on_tcp_data(static_cast<uint8_t *>(data), size);
static_cast<EWHCloud *>(arg)->on_tcp_data(static_cast<uint8_t *>(data), size);
},
this);

Expand Down

0 comments on commit b5550bc

Please sign in to comment.