mirror of
https://github.com/KinDR007/VictronMPPT-ESPHOME.git
synced 2024-10-21 07:09:27 +00:00
Bump python version from 3.8 to 3.9 (#100)
This commit is contained in:
parent
487b7c60a7
commit
9ef24ddefb
20
.github/workflows/ci.yaml
vendored
20
.github/workflows/ci.yaml
vendored
@ -21,7 +21,7 @@ jobs:
|
||||
lint-clang-format:
|
||||
env:
|
||||
esphome_directory: esphome
|
||||
esphome_version: 2022.1.1
|
||||
esphome_version: 2022.9.3
|
||||
runs-on: ubuntu-latest
|
||||
# cpp lint job runs with esphome-lint docker image so that clang-format-*
|
||||
# doesn't have to be installed
|
||||
@ -56,7 +56,7 @@ jobs:
|
||||
lint-clang-tidy:
|
||||
env:
|
||||
esphome_directory: esphome
|
||||
esphome_version: 2022.1.1
|
||||
esphome_version: 2022.9.3
|
||||
runs-on: ubuntu-latest
|
||||
# cpp lint job runs with esphome-lint docker image so that clang-format-*
|
||||
# doesn't have to be installed
|
||||
@ -98,7 +98,7 @@ jobs:
|
||||
lint-python:
|
||||
env:
|
||||
esphome_directory: esphome
|
||||
esphome_version: 2022.1.1
|
||||
esphome_version: 2022.9.3
|
||||
# Don't use the esphome-lint docker image because it may contain outdated requirements.
|
||||
# This way, all dependencies are cached via the cache action.
|
||||
runs-on: ubuntu-latest
|
||||
@ -107,14 +107,14 @@ jobs:
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: '3.8'
|
||||
python-version: '3.9'
|
||||
- name: Cache pip modules
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: esphome-pip-3.8-${{ hashFiles('setup.py') }}
|
||||
key: esphome-pip-3.9-${{ hashFiles('setup.py') }}
|
||||
restore-keys: |
|
||||
esphome-pip-3.8-
|
||||
esphome-pip-3.9-
|
||||
|
||||
- name: 💣Clone esphome project
|
||||
run: git clone -b ${{ env.esphome_version }} https://github.com/esphome/esphome.git
|
||||
@ -149,10 +149,10 @@ jobs:
|
||||
steps:
|
||||
- name: ⤵️ Check out configuration from GitHub
|
||||
uses: actions/checkout@v2
|
||||
- name: Setup Python 3.8
|
||||
- name: Setup Python 3.9
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.8
|
||||
python-version: 3.9
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip setuptools wheel
|
||||
@ -205,10 +205,10 @@ jobs:
|
||||
path: .pioenvs
|
||||
key: esphome-compile-pioenvs-${{ hashFiles('*.yaml') }}
|
||||
restore-keys: esphome-compile-pioenvs-
|
||||
- name: Set up Python 3.8
|
||||
- name: Set up Python 3.9
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.8
|
||||
python-version: 3.9
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip setuptools wheel
|
||||
|
@ -102,8 +102,9 @@ void VictronComponent::loop() {
|
||||
uint8_t c;
|
||||
read_byte(&c);
|
||||
if (state_ == 0) {
|
||||
if (c == '\r' || c == '\n')
|
||||
if (c == '\r' || c == '\n') {
|
||||
continue;
|
||||
}
|
||||
label_.clear();
|
||||
value_.clear();
|
||||
state_ = 1;
|
||||
@ -114,10 +115,11 @@ void VictronComponent::loop() {
|
||||
state_ = 3;
|
||||
continue;
|
||||
}
|
||||
if (c == '\t')
|
||||
if (c == '\t') {
|
||||
state_ = 2;
|
||||
else
|
||||
} else {
|
||||
label_.push_back(c);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (state_ == 2) {
|
||||
@ -150,7 +152,7 @@ void VictronComponent::loop() {
|
||||
}
|
||||
}
|
||||
|
||||
static const std::string charging_mode_text(int value) {
|
||||
static std::string charging_mode_text(int value) {
|
||||
switch (value) {
|
||||
case 0:
|
||||
return "Off";
|
||||
@ -187,7 +189,7 @@ static const std::string charging_mode_text(int value) {
|
||||
}
|
||||
}
|
||||
|
||||
static const std::string error_code_text(int value) {
|
||||
static std::string error_code_text(int value) {
|
||||
switch (value) {
|
||||
case 0:
|
||||
return "No error";
|
||||
@ -234,7 +236,7 @@ static const std::string error_code_text(int value) {
|
||||
}
|
||||
}
|
||||
|
||||
static const std::string warning_code_text(int value) {
|
||||
static std::string warning_code_text(int value) {
|
||||
switch (value) {
|
||||
case 0:
|
||||
return "No warning";
|
||||
@ -267,7 +269,7 @@ static const std::string warning_code_text(int value) {
|
||||
}
|
||||
}
|
||||
|
||||
static const std::string tracking_mode_text(int value) {
|
||||
static std::string tracking_mode_text(int value) {
|
||||
switch (value) {
|
||||
case 0:
|
||||
return "Off";
|
||||
@ -280,7 +282,7 @@ static const std::string tracking_mode_text(int value) {
|
||||
}
|
||||
}
|
||||
|
||||
static const std::string device_mode_text(int value) {
|
||||
static std::string device_mode_text(int value) {
|
||||
switch (value) {
|
||||
case 0:
|
||||
return "Off";
|
||||
@ -295,7 +297,7 @@ static const std::string device_mode_text(int value) {
|
||||
}
|
||||
}
|
||||
|
||||
static const std::string dc_monitor_mode_text(int value) {
|
||||
static std::string dc_monitor_mode_text(int value) {
|
||||
switch (value) {
|
||||
case -9:
|
||||
return "Solar charger";
|
||||
@ -338,7 +340,7 @@ static const std::string dc_monitor_mode_text(int value) {
|
||||
}
|
||||
}
|
||||
|
||||
static const std::string device_type_text(int value) {
|
||||
static std::string device_type_text(int value) {
|
||||
switch (value) {
|
||||
case 0x203:
|
||||
return "BMV-700";
|
||||
@ -615,7 +617,7 @@ static const std::string device_type_text(int value) {
|
||||
}
|
||||
}
|
||||
|
||||
static const std::string off_reason_text(uint32_t mask) {
|
||||
static std::string off_reason_text(uint32_t mask) {
|
||||
bool first = true;
|
||||
std::string value_list = "";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user