Skip to content

Commit

Permalink
Default MQTT values to match the lib defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
mpepping committed Jan 7, 2023
1 parent 9afe55e commit c05efa5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,9 @@
]
}
},
"postCreateCommand": "pip install black jsonschema paho_mqtt pylint && sudo -n apt update && sudo -n apt install git -y"
"postCreateCommand": "pip install black jsonschema paho_mqtt pylint && sudo -n apt update && sudo -n apt install git -y",

// https://www.kenmuse.com/blog/avoiding-dubious-ownership-in-dev-containers/
"postStartCommand": "git config --global --add safe.directory ${containerWorkspaceFolder}"

}
4 changes: 2 additions & 2 deletions solarman/mqtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ def __init__(self, config):
self.port = config["port"]
self.username = config["username"]
self.password = config["password"]
self.qos = config.get("qos", 1)
self.retain = config.get("retain", True)
self.qos = config.get("qos", 0)
self.retain = config.get("retain", False)
self.client = Mqtt.connect(self)

def connect(self):
Expand Down

0 comments on commit c05efa5

Please sign in to comment.