diff --git a/README.md b/README.md index 28b3d6b..38e5292 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ After the installation, you can use this button to install the integration: - EP500 - EP500P - EP600 (tested) -- EP700 (beta, untested) +- EP760 (beta, untested) ### Available sensors: All sensors which are available in bluetti_mqtt (Based on [this file](https://github.com/warhammerkid/bluetti_mqtt/blob/main/bluetti_mqtt/mqtt_client.py)). diff --git a/custom_components/bluetti_bt/__init__.py b/custom_components/bluetti_bt/__init__.py index 5aeee6b..68e4d30 100644 --- a/custom_components/bluetti_bt/__init__.py +++ b/custom_components/bluetti_bt/__init__.py @@ -28,7 +28,7 @@ from .const import ( ) from .coordinator import PollingCoordinator from .devices.ep600 import EP600 -from .devices.ep700 import EP700 +from .devices.ep760 import EP760 PLATFORMS: [Platform] = [Platform.BINARY_SENSOR, Platform.SENSOR] _LOGGER = logging.getLogger(__name__) @@ -107,14 +107,14 @@ def get_type_by_bt_name(bt_name: str): dev_type = "EP500" elif bt_name.startswith("EP600"): dev_type = "EP600" - elif bt_name.startswith("EP700"): - dev_type = "EP700" + elif bt_name.startswith("EP760"): + dev_type = "EP760" return dev_type def build_device(address: str, name: str): match = DEVICE_NAME_RE.match(name) - if match[1] == 'EP700': - return EP700(address, match[2]) + if match[1] == 'EP760': + return EP760(address, match[2]) elif match[1] == 'EP600': return EP600(address, match[2]) else: diff --git a/custom_components/bluetti_bt/const.py b/custom_components/bluetti_bt/const.py index e25a033..545e80f 100644 --- a/custom_components/bluetti_bt/const.py +++ b/custom_components/bluetti_bt/const.py @@ -17,7 +17,7 @@ CONF_MAX_RETRIES = "max_retries" DATA_COORDINATOR = "coordinator" DATA_POLLING_RUNNING = "polling_running" -DEVICE_NAME_RE = re.compile(r'^(AC200M|AC300|AC500|AC60|EP500P|EP500|EP600|EP700|EB3A)(\d+)$') +DEVICE_NAME_RE = re.compile(r'^(AC200M|AC300|AC500|AC60|EP500P|EP500|EP600|EP760|EB3A)(\d+)$') CONTROL_FIELDS = [ "ac_output_on", diff --git a/custom_components/bluetti_bt/devices/ep700.py b/custom_components/bluetti_bt/devices/ep760.py similarity index 96% rename from custom_components/bluetti_bt/devices/ep700.py rename to custom_components/bluetti_bt/devices/ep760.py index b6ae3f0..6028f23 100644 --- a/custom_components/bluetti_bt/devices/ep700.py +++ b/custom_components/bluetti_bt/devices/ep760.py @@ -1,4 +1,4 @@ -"""EP700 Field definitions. +"""EP760 Field definitions. Changes made here are only temporary and should also be contributed to https://github.com/warhammerkid/bluetti_mqtt @@ -10,7 +10,7 @@ from bluetti_mqtt.core.devices.bluetti_device import BluettiDevice from bluetti_mqtt.core.devices.struct import DeviceStruct from bluetti_mqtt.core.commands import ReadHoldingRegisters -class EP700(BluettiDevice): +class EP760(BluettiDevice): def __init__(self, address: str, sn: str): self.struct = DeviceStruct() @@ -36,7 +36,7 @@ class EP700(BluettiDevice): self.struct.add_version_field('safety_module_version', 6181) self.struct.add_version_field('high_voltage_module_version', 6184) - super().__init__(address, 'EP700', sn) + super().__init__(address, 'EP760', sn) @property def polling_commands(self) -> List[ReadHoldingRegisters]: diff --git a/custom_components/bluetti_bt/manifest.json b/custom_components/bluetti_bt/manifest.json index 81ad886..4ad5e68 100644 --- a/custom_components/bluetti_bt/manifest.json +++ b/custom_components/bluetti_bt/manifest.json @@ -9,7 +9,7 @@ { "local_name": "EB3A*" }, { "local_name": "EP500*" }, { "local_name": "EP600*" }, - { "local_name": "EP700*" } + { "local_name": "EP760*" } ], "codeowners": ["@Patrick762"], "config_flow": true, @@ -19,5 +19,5 @@ "iot_class": "local_polling", "issue_tracker": "https://github.com/Patrick762/hassio-bluetti-bt/issues", "requirements": ["bluetti_mqtt==0.15.0"], - "version": "0.0.12" + "version": "0.0.13" }