5 Commits

Author SHA1 Message Date
Sebastian Muszynski
a6d882de4a Fix ble_client build issue (#70)
Some checks failed
CI / yamllint (push) Has been cancelled
CI / Bundle external component and ESPHome (push) Has been cancelled
CI / Create common environment (push) Has been cancelled
CI / Check ruff (push) Has been cancelled
CI / Check flake8 (push) Has been cancelled
CI / Check pylint (push) Has been cancelled
CI / Check pyupgrade (push) Has been cancelled
CI / Run script/ci-custom (push) Has been cancelled
CI / Check clang-format (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 Arduino 1/4 (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 Arduino 2/4 (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 Arduino 3/4 (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 Arduino 4/4 (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 IDF (push) Has been cancelled
CI / Run script/clang-tidy for ESP8266 (push) Has been cancelled
CI / Validate example configurations (push) Has been cancelled
CI / Build example configurations (push) Has been cancelled
2025-07-21 18:33:07 +02:00
Sebastian Muszynski
8cb0f29c7d Drop Python 3.10 support (#69) 2025-07-21 15:20:25 +02:00
Sebastian Muszynski
79c0236050 Complete dump config (#68)
Some checks failed
CI / yamllint (push) Has been cancelled
CI / Bundle external component and ESPHome (push) Has been cancelled
CI / Create common environment (push) Has been cancelled
CI / Check ruff (push) Has been cancelled
CI / Check flake8 (push) Has been cancelled
CI / Check pylint (push) Has been cancelled
CI / Check pyupgrade (push) Has been cancelled
CI / Run script/ci-custom (push) Has been cancelled
CI / Check clang-format (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 Arduino 1/4 (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 Arduino 2/4 (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 Arduino 3/4 (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 Arduino 4/4 (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 IDF (push) Has been cancelled
CI / Run script/clang-tidy for ESP8266 (push) Has been cancelled
CI / Validate example configurations (push) Has been cancelled
CI / Build example configurations (push) Has been cancelled
2025-07-09 09:56:33 +02:00
Sebastian Muszynski
f10cae1824 Centralize component schema declarations (#67)
Some checks failed
CI / yamllint (push) Has been cancelled
CI / Bundle external component and ESPHome (push) Has been cancelled
CI / Create common environment (push) Has been cancelled
CI / Check ruff (push) Has been cancelled
CI / Check flake8 (push) Has been cancelled
CI / Check pylint (push) Has been cancelled
CI / Check pyupgrade (push) Has been cancelled
CI / Run script/ci-custom (push) Has been cancelled
CI / Check clang-format (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 Arduino 1/4 (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 Arduino 2/4 (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 Arduino 3/4 (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 Arduino 4/4 (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 IDF (push) Has been cancelled
CI / Run script/clang-tidy for ESP8266 (push) Has been cancelled
CI / Validate example configurations (push) Has been cancelled
CI / Build example configurations (push) Has been cancelled
2025-07-08 07:19:34 +02:00
Sebastian Muszynski
5b72c21170 Use main per default
Some checks failed
CI / yamllint (push) Has been cancelled
CI / Bundle external component and ESPHome (push) Has been cancelled
CI / Create common environment (push) Has been cancelled
CI / Check ruff (push) Has been cancelled
CI / Check flake8 (push) Has been cancelled
CI / Check pylint (push) Has been cancelled
CI / Check pyupgrade (push) Has been cancelled
CI / Run script/ci-custom (push) Has been cancelled
CI / Check clang-format (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 Arduino 1/4 (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 Arduino 2/4 (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 Arduino 3/4 (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 Arduino 4/4 (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 IDF (push) Has been cancelled
CI / Run script/clang-tidy for ESP8266 (push) Has been cancelled
CI / Validate example configurations (push) Has been cancelled
CI / Build example configurations (push) Has been cancelled
2025-07-07 13:49:00 +02:00
13 changed files with 34 additions and 23 deletions

View File

@@ -14,8 +14,8 @@ permissions:
env:
FORCE_COLOR: 1
DEFAULT_PYTHON: "3.10"
PYUPGRADE_TARGET: "--py310-plus"
DEFAULT_PYTHON: "3.11"
PYUPGRADE_TARGET: "--py311-plus"
concurrency:
# yamllint disable-line rule:line-length

View File

@@ -33,7 +33,7 @@ repos:
rev: v3.19.1
hooks:
- id: pyupgrade
args: [--py310-plus]
args: [--py311-plus]
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.35.1
hooks:

View File

@@ -15,6 +15,12 @@ CONF_RX_TIMEOUT = "rx_timeout"
votronic_ns = cg.esphome_ns.namespace("votronic")
Votronic = votronic_ns.class_("Votronic", cg.PollingComponent, uart.UARTDevice)
VOTRONIC_COMPONENT_SCHEMA = cv.Schema(
{
cv.GenerateID(CONF_VOTRONIC_ID): cv.use_id(Votronic),
}
)
CONFIG_SCHEMA = (
cv.Schema(
{

View File

@@ -3,7 +3,7 @@ from esphome.components import binary_sensor
import esphome.config_validation as cv
from esphome.const import CONF_ID
from . import CONF_VOTRONIC_ID, Votronic
from . import CONF_VOTRONIC_ID, VOTRONIC_COMPONENT_SCHEMA
DEPENDENCIES = ["votronic"]
@@ -46,9 +46,8 @@ BINARY_SENSORS = [
CONF_PV_AES_ACTIVE,
]
CONFIG_SCHEMA = cv.Schema(
CONFIG_SCHEMA = VOTRONIC_COMPONENT_SCHEMA.extend(
{
cv.GenerateID(CONF_VOTRONIC_ID): cv.use_id(Votronic),
cv.Optional(CONF_CHARGING): binary_sensor.binary_sensor_schema(
icon="mdi:battery-charging",
),

View File

@@ -21,7 +21,7 @@ from esphome.const import (
UNIT_WATT,
)
from . import CONF_VOTRONIC_ID, Votronic
from . import CONF_VOTRONIC_ID, VOTRONIC_COMPONENT_SCHEMA
DEPENDENCIES = ["votronic"]
@@ -119,9 +119,8 @@ SENSORS = [
CONF_PV_CONTROLLER_TEMPERATURE,
]
CONFIG_SCHEMA = cv.Schema(
CONFIG_SCHEMA = VOTRONIC_COMPONENT_SCHEMA.extend(
{
cv.GenerateID(CONF_VOTRONIC_ID): cv.use_id(Votronic),
cv.Optional(CONF_BATTERY_VOLTAGE): sensor.sensor_schema(
unit_of_measurement=UNIT_VOLT,
icon=ICON_EMPTY,

View File

@@ -3,7 +3,7 @@ from esphome.components import text_sensor
import esphome.config_validation as cv
from esphome.const import CONF_ID
from . import CONF_VOTRONIC_ID, Votronic
from . import CONF_VOTRONIC_ID, VOTRONIC_COMPONENT_SCHEMA
DEPENDENCIES = ["votronic"]
@@ -36,9 +36,8 @@ TEXT_SENSORS = [
CONF_PV_CONTROLLER_STATUS,
]
CONFIG_SCHEMA = cv.Schema(
CONFIG_SCHEMA = VOTRONIC_COMPONENT_SCHEMA.extend(
{
cv.GenerateID(CONF_VOTRONIC_ID): cv.use_id(Votronic),
cv.Optional(CONF_BATTERY_STATUS): text_sensor.text_sensor_schema(
text_sensor.TextSensor, icon="mdi:alert-circle-outline"
),

View File

@@ -511,6 +511,8 @@ void Votronic::dump_config() {
this->charging_converter_controller_status_bitmask_sensor_);
LOG_SENSOR("", "Charging converter mode setting ID", this->charging_converter_mode_setting_id_sensor_);
LOG_SENSOR("", "Charging converter controller temperature", this->charging_converter_controller_temperature_sensor_);
LOG_SENSOR("", "Charging converter state of charge", this->charging_converter_state_of_charge_sensor_);
LOG_SENSOR("", "PV Mode Setting ID", this->pv_mode_setting_id_sensor_);
LOG_TEXT_SENSOR("", "Battery status", this->battery_status_text_sensor_);
@@ -524,6 +526,7 @@ void Votronic::dump_config() {
LOG_TEXT_SENSOR("", "PV battery status", this->pv_battery_status_text_sensor_);
LOG_TEXT_SENSOR("", "PV controller status", this->pv_controller_status_text_sensor_);
LOG_TEXT_SENSOR("", "PV Mode Setting", this->pv_mode_setting_text_sensor_);
this->check_uart_settings(1000);
}

View File

@@ -27,10 +27,18 @@ CONFIG_SCHEMA = (
.extend(cv.polling_component_schema("2s"))
)
# Centralized schema for subcomponents
VOTRONIC_BLE_SCHEMA = cv.Schema(
{
cv.GenerateID(CONF_VOTRONIC_BLE_ID): cv.use_id(VotronicBle),
}
)
async def to_code(config):
var = cg.new_Pvariable(config[CONF_ID])
await cg.register_component(var, config)
await ble_client.register_ble_node(var, config)
cg.add_define("USE_ESP32_BLE_DEVICE")
cg.add(var.set_throttle(config[CONF_THROTTLE]))

View File

@@ -3,7 +3,7 @@ from esphome.components import binary_sensor
import esphome.config_validation as cv
from esphome.const import CONF_ID
from . import CONF_VOTRONIC_BLE_ID, VotronicBle
from . import CONF_VOTRONIC_BLE_ID, VOTRONIC_BLE_SCHEMA
DEPENDENCIES = ["votronic_ble"]
@@ -29,9 +29,8 @@ BINARY_SENSORS = [
CONF_AES_ACTIVE,
]
CONFIG_SCHEMA = cv.Schema(
CONFIG_SCHEMA = VOTRONIC_BLE_SCHEMA.extend(
{
cv.GenerateID(CONF_VOTRONIC_BLE_ID): cv.use_id(VotronicBle),
cv.Optional(CONF_CHARGING): binary_sensor.binary_sensor_schema(
binary_sensor.BinarySensor, icon=ICON_CHARGING
),

View File

@@ -20,7 +20,7 @@ from esphome.const import (
UNIT_WATT_HOURS,
)
from . import CONF_VOTRONIC_BLE_ID, VotronicBle
from . import CONF_VOTRONIC_BLE_ID, VOTRONIC_BLE_SCHEMA
DEPENDENCIES = ["votronic_ble"]
@@ -71,9 +71,8 @@ SENSORS = [
CONF_CHARGED_ENERGY,
]
CONFIG_SCHEMA = cv.Schema(
CONFIG_SCHEMA = VOTRONIC_BLE_SCHEMA.extend(
{
cv.GenerateID(CONF_VOTRONIC_BLE_ID): cv.use_id(VotronicBle),
cv.Optional(CONF_BATTERY_VOLTAGE): sensor.sensor_schema(
unit_of_measurement=UNIT_VOLT,
icon=ICON_EMPTY,

View File

@@ -3,7 +3,7 @@ from esphome.components import text_sensor
import esphome.config_validation as cv
from esphome.const import CONF_ID
from . import CONF_VOTRONIC_BLE_ID, VotronicBle
from . import CONF_VOTRONIC_BLE_ID, VOTRONIC_BLE_SCHEMA
DEPENDENCIES = ["votronic_ble"]
@@ -20,9 +20,8 @@ TEXT_SENSORS = [
CONF_PV_CONTROLLER_STATUS,
]
CONFIG_SCHEMA = cv.Schema(
CONFIG_SCHEMA = VOTRONIC_BLE_SCHEMA.extend(
{
cv.GenerateID(CONF_VOTRONIC_BLE_ID): cv.use_id(VotronicBle),
cv.Optional(CONF_BATTERY_STATUS): text_sensor.text_sensor_schema(
class_=text_sensor.TextSensor,
icon=ICON_BATTERY_STATUS,

View File

@@ -1,7 +1,7 @@
substitutions:
name: votronic
device_description: "Monitor a votronic device via BLE"
external_components_source: github://syssi/esphome-votronic@drop-patched-ble-stack
external_components_source: github://syssi/esphome-votronic@main
mac_address: 60:A4:23:91:8F:55
esphome:

View File

@@ -1,7 +1,7 @@
substitutions:
name: votronic-solar-charger
device_description: "Monitor a Votronic Solar Charger via the display link port (UART)"
external_components_source: github://syssi/esphome-votronic@verify-triple-charger-controller
external_components_source: github://syssi/esphome-votronic@main
tx_pin: GPIO4
rx_pin: GPIO5
rx_timeout: 600ms