Skip to content

Commit

Permalink
renamed ep700 to ep760
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick762 committed Feb 4, 2024
1 parent 463f02b commit 9ef9d38
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)).
Expand Down
10 changes: 5 additions & 5 deletions custom_components/bluetti_bt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
)
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__)
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion custom_components/bluetti_bt/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
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",
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -10,7 +10,7 @@
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()

Expand All @@ -36,7 +36,7 @@ def __init__(self, address: str, sn: str):
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]:
Expand Down
4 changes: 2 additions & 2 deletions custom_components/bluetti_bt/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{ "local_name": "EB3A*" },
{ "local_name": "EP500*" },
{ "local_name": "EP600*" },
{ "local_name": "EP700*" }
{ "local_name": "EP760*" }
],
"codeowners": ["@Patrick762"],
"config_flow": true,
Expand All @@ -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"
}

0 comments on commit 9ef9d38

Please sign in to comment.