Commit Graph

17 Commits

Author SHA1 Message Date
不求圣剑
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