Commit Graph

31 Commits

Author SHA1 Message Date
不求圣剑
c5a776b203 refactor: add new EPS sensors and update mappings in JackeryHome
- Introduced new sensors for EPS power, export energy, and import energy with appropriate configurations.
- Updated the meter serial number mappings to include the new EPS sensors for improved data accuracy.
2025-11-25 14:26:55 +08:00
不求圣剑
80856f58dc refactor: correct battery consumption and production mappings in energy flow card configuration
- Swapped the consumption and production sensor references for the battery entity in the energy flow card configuration to ensure accurate energy flow representation.
- Updated grid import and export energy serial numbers in the JackeryHome sensor mappings for consistency and improved accuracy.
2025-11-25 10:56:20 +08:00
不求圣剑
1d50d5a7b0 refactor: update energy flow card configuration and sensor logic for improved accuracy
- Modified the energy flow card configuration to reflect correct sensor mappings for grid and battery entities, changing production and consumption references.
- Enhanced the JackeryHome sensor logic to ensure accurate power readings for battery charge and discharge, correcting the handling of meter values.
- Updated display states for better representation of energy flow direction.
2025-11-25 10:24:04 +08:00
不求圣剑
67371a7b8c refactor: update energy flow card configuration for improved clarity and functionality
- Reorganized entity references in the energy flow card configuration, introducing a clearer structure for grid, solar, and battery entities.
- Updated sensor mappings for grid consumption and production, battery charge/discharge, and state of charge.
- Removed outdated individual entity configurations to streamline the setup.
2025-11-25 10:09:52 +08:00
不求圣剑
cfd4a0f216 refactor: update meter serial numbers in JackeryHome sensor mappings
- Updated the serial numbers for home energy and solar power to reflect the correct values.
- Ensured consistency in sensor mappings for improved data accuracy.
2025-11-24 16:58:10 +08:00
不求圣剑
1d9f756f76 refactor: update energy flow card configuration and sensor mappings for JackeryHome
- Renamed the energy flow card from `energy-flow-card-plus` to `power-flow-card-plus` for consistency.
- Updated entity references in the energy flow card configuration to align with new sensor identifiers, including home power, solar power, and grid import/export.
- Adjusted the JackeryHome sensor mappings to reflect the correct meter serial numbers and improved the handling of power sensor values.
- Enhanced the configuration with additional properties such as `min_flow_rate`, `max_flow_rate`, and `clickable_entities` for better functionality.
2025-11-24 16:05:12 +08:00
不求圣剑
7bc30655c9 refactor: update energy point identifiers in data transmission example and JackeryHome sensor
- Updated home energy, grid import/export, and battery charge/discharge point identifiers to new values for consistency across the project.
- Adjusted the default device serial number in the JackeryDataCoordinator to an empty string for improved flexibility.
2025-11-24 14:32:39 +08:00
不求圣剑
4b8dd033db feat: add battery state of charge calculation in JackeryHome sensor
- Implemented a new calculation for battery state of charge (SOC) by multiplying the meter value by 0.1 to convert it to a percentage.
2025-11-18 17:29:10 +08:00
不求圣剑
bc5865a0ef fix: update entity name attribute in JackeryHome sensor
- Changed the `_attr_has_entity_name` attribute from `True` to `False` to reflect the correct entity naming behavior.
2025-11-18 17:21:08 +08:00
不求圣剑
0441a1ab38 feat: enhance MQTT integration checks in JackeryHome
- Added validation to ensure MQTT integration is configured before setting up the JackeryHome integration.
- Updated error handling in the configuration flow to provide user feedback if MQTT is not available.
- Improved logging for MQTT subscription processes and error handling in the data coordinator.
- Updated user interface strings to reflect the new requirements for MQTT integration.
2025-11-18 17:04:55 +08:00
不求圣剑
b68566edd1 feat: implement data coordinator for JackeryHome integration
- Introduced a new `JackeryDataCoordinator` class to manage MQTT subscriptions and data retrieval for all sensor entities.
- Updated the setup process to create and start the coordinator, allowing shared data handling among sensors.
- Enhanced sensor lifecycle management by registering and unregistering sensors with the coordinator.
- Improved logging for better visibility into the coordinator's operations and sensor updates.
2025-11-18 16:59:52 +08:00
不求圣剑
c94fb0d0c8 fix: improve MQTT connection handling in JackeryHome sensor
- Added a delay at startup to ensure MQTT connection is established before sending data requests.
- Implemented error handling for MQTT connection issues, logging warnings and continuing the periodic data request process.
- Enhanced logging for task cancellation to provide clearer feedback on sensor operation.
2025-11-18 16:47:15 +08:00
不求圣剑
3bb61cb16d feat: add TODO for device serial number retrieval in JackeryHome sensor
- Added a TODO comment to implement retrieval of the device serial number from LWT messages for future enhancements.
2025-11-18 16:42:13 +08:00
不求圣剑
7181579d66 fix: update device serial number in JackeryHome sensor
- Changed the device serial number from an empty string to a specific value for improved identification and functionality.
2025-11-18 16:41:54 +08:00
不求圣剑
d92fb9781a refactor: enhance sensor lifecycle management in JackeryHome component
- Added calls to `super().async_added_to_hass()` and `super().async_will_remove_from_hass()` for improved lifecycle handling.
- Ensured proper logging during sensor addition and removal from Home Assistant.
2025-11-18 16:33:03 +08:00
不求圣剑
fbd766d035 feat: enhance JackeryHome sensor attributes for improved functionality
- Added `_attr_should_poll` attribute to indicate polling behavior.
- Introduced `_attr_has_entity_name` attribute to support entity naming conventions.
2025-11-18 16:20:13 +08:00
不求圣剑
15215ab232 refactor: improve sensor handling and data processing in JackeryHome component
- Introduced a constant for request interval to standardize data request timing.
- Refactored meter serial number mapping logic for clarity and maintainability.
- Enhanced LWT and data message handling with dedicated methods for improved readability and error handling.
- Updated periodic data request logic to utilize the new request interval constant.
2025-11-18 16:08:40 +08:00
不求圣剑
ad4105af5e refactor: rename JackeryHome component directory and update references
- Renamed the `custom_components/jackery_home/` directory to `custom_components/JackeryHome/` for consistency with naming conventions.
- Updated all relevant documentation and scripts to reflect the new directory name.
- Removed obsolete files related to the previous directory structure.
2025-11-18 15:45:27 +08:00
不求圣剑
2d22a25006 refactor: rename JackeryHome component directory and update references
- Renamed the `custom_components/JackeryHome/` directory to `custom_components/jackery_home/` for consistency.
- Updated all references in documentation and scripts to reflect the new directory name.
- Removed obsolete files related to the previous directory structure.
2025-11-18 15:37:19 +08:00
不求圣剑
9f331f9654 fix: refine meter serial number mapping and data topic handling in JackeryHome sensor
- Updated meter serial number mapping logic to explicitly handle "grid_import" and "grid_export" sensor IDs.
- Simplified data topic assignment by removing unnecessary conditional checks.
2025-11-18 15:18:56 +08:00
不求圣剑
679fc4bd77 fix: update MQTT broker address and correct data topic structure
- Changed MQTT broker address from 192.168.0.101 to 192.168.1.100 in delete.py.
- Updated meter serial number mappings in sensor.py to use string types for consistency.
- Adjusted data topic paths in sensor.py for improved clarity and functionality.
2025-11-18 15:04:16 +08:00
不求圣剑
1c3933d5e3 feat: enhance data transmission and sensor handling
- Added new energy data points and updated the initialization of energy variables in data_transmission_example.py.
- Improved data construction and parsing methods to handle new data formats and ensure compatibility with updated MQTT topics.
- Refined sensor logic in JackeryHome component to correctly map meter serial numbers and handle power values more robustly.
- Ensured consistent data types for meter values and improved error handling during data processing.
2025-11-18 14:45:26 +08:00
不求圣剑
054fa172f2 feat: update MQTT broker and enhance data handling
- Changed MQTT broker address from 192.168.0.101 to 192.168.1.100 across multiple files.
- Introduced new data handling methods in data_transmission_example.py for constructing and parsing data requests and responses.
- Updated MQTT topics to follow a new structure for better organization and clarity.
- Enhanced sensor logic in JackeryHome component to support new data formats and improve device state management.
2025-11-18 11:06:31 +08:00
不求圣剑
a3d46e8f7a feat: 增加能源数据模拟发送功能
- 在data_transmission_example.py中增加energy类型数据的模拟发送
- 能源数据基准从1kWh开始,每次增加0.1kWh
- 简化传感器处理逻辑,直接显示累积值而不进行计算
- 支持所有能源类型:太阳能、家庭用电、电网购买/出售、电池充放电
2025-10-15 10:49:38 +08:00
不求圣剑
792f60e29c feat: energy sensors and accumulation; bump to v1.1.0 2025-10-14 16:45:47 +08:00
不求圣剑
b15c607a2e Update sensor names in JackeryHome component from Chinese to English for better clarity and consistency. 2025-10-14 14:54:36 +08:00
不求圣剑
c674c6a2af 版本更新至 v1.0.5
- 修改 MQTT topic 为 device/data 和 device/data-get
- 添加订阅 device/data topic 处理消息回调
- 实现每隔5秒向 device/data-get 发送数据获取请求
- 优化数据解析逻辑,支持 JSON 和数值格式
- 添加定时器任务管理和清理机制
2025-10-14 14:41:15 +08:00
不求圣剑
3d9637e7da 版本更新至 v1.0.4
包含新功能:
- 增强配置流程,确保只能创建单个实例
- 更新错误消息以反映新的中止原因
2025-10-14 14:13:44 +08:00
不求圣剑
18c47052e6 修复代码问题并更新版本到 v1.0.3
- 修复 config_flow.py 中的 KeyError 风险
- 添加 MQTT broker 地址和端口验证
- 完善翻译文件,添加所有配置字段的中文翻译
- 修复 sensor.py 中的弃用 API 使用
- 改进错误处理,转换失败时设置 available 为 False
- 添加 device_info 中的 sw_version 字段
- 清理 manifest.json 中不必要的 paho-mqtt 依赖
- 修正 README.md 中的路径错误
- 更新版本号到 1.0.3
2025-10-14 11:51:13 +08:00
不求圣剑
04821cb501 修复实体设备不显示问题
- 重写 sensor.py,使用 Home Assistant 内置 MQTT 组件
- 修复配置流程标题显示
- 添加更好的错误处理和日志记录
- 创建 MQTT 测试脚本
- 统一所有日志信息为 JackeryHome
2025-10-14 11:04:32 +08:00
不求圣剑
3f698d6e16 first commit 2025-10-14 10:44:00 +08:00