diff --git a/.HA_VERSION b/.HA_VERSION index 1698e92..ca26d9a 100755 --- a/.HA_VERSION +++ b/.HA_VERSION @@ -1 +1 @@ -2023.11.2 \ No newline at end of file +2024.6.4 \ No newline at end of file diff --git a/configuration.yaml b/configuration.yaml index aa66a93..8335d66 100755 --- a/configuration.yaml +++ b/configuration.yaml @@ -18,10 +18,6 @@ http: # default_config: -automation: !include_dir_merge_list automations -# scene: !include scenes.yaml -# script: !include scripts.yaml - # usb: # bluetooth: @@ -30,27 +26,27 @@ automation: !include_dir_merge_list automations config: # energy: frontend: -mobile_app: +# mobile_app: system_health: # homeassistant_alerts: -webhook: +# webhook: # updater: # dhcp: # ssdp: # zeroconf: -input_boolean: -input_button: -input_datetime: -input_number: -input_select: +# input_boolean: +# input_button: +# input_datetime: +# input_number: +# input_select: input_text: -counter: -timer: +# counter: +# timer: #my: -tag: +# tag: sun: zone: # stream: @@ -65,7 +61,7 @@ logger: custom_components: debug recorder: - purge_keep_days: 2 + purge_keep_days: 4 exclude: domains: - sun @@ -77,18 +73,35 @@ recorder: - input_select - input_boolean -# tts: -# - platform: baidu -# app_id: !secret baidu_app_id -# api_key: !secret baidu_api_key -# secret_key: !secret baidu_secret_key - -homekit: !include homekit.yaml +# modbus: +# - type: rtuovertcp +# host: 192.168.1.60 +# port: 8899 +# switches: +# - name: 餐厅空调 +# address: 1 +# command_on: 1 +# command_off: 0 +# write_type: coil +# - name: 客厅空调 +# address: 2 +# command_on: 1 +# command_off: 0 +# write_type: coil +# - name: 主卧空调 +# address: 3 +# command_on: 1 +# command_off: 0 +# write_type: coil +# - name: 儿童房空调 +# address: 4 +# command_on: 1 +# command_off: 0 +# write_type: coil -modbus: - type: rtuovertcp - host: 192.168.1.60 - port: 8899 +zhimi: + username: !secret zhimi_username + password: !secret zhimi_password device_tracker: - platform: ping @@ -124,12 +137,6 @@ weather: - platform: zhicaiyun name: 天气 -#sensor: !include sensors.yaml -#switch: !include switches.yaml -light: !include lights.yaml -fan: !include fans.yaml -mqtt: !include mqtt.yaml - climate: - platform: zhisaswell name: 客厅地暖 @@ -139,15 +146,15 @@ climate: name: 主卧地暖 host: 192.168.1.57 device: 10382435CC059F72 - - platform: zhimodbus - name: [餐厅空调, 客厅空调, 主卧空调, 儿童房空调] - fan_mode: { registers: [6, 10, 14, 18] } - fan_modes: { 自动: 0, 一档: 1, 二档: 2, 三档: 3, 四档: 4, 五档: 5 } - hvac_mode: { registers: [5, 9, 13, 17] } - hvac_modes: { 'off': 0, cool: 1, heat: 2, dry: 3, fan_only: 4 } - hvac_off: { registers: [1, 2, 3, 4], register_type: coil } - target_temperature: { registers: [4, 8, 12, 16] } - temperature: { registers: [3, 6, 9, 12], register_type: input, scale: 0.1 } + # - platform: zhimodbus + # name: [餐厅空调, 客厅空调, 主卧空调, 儿童房空调] + # fan_mode: { registers: [6, 10, 14, 18] } + # fan_modes: { 自动: 0, 一档: 1, 二档: 2, 三档: 3, 四档: 4, 五档: 5 } + # hvac_mode: { registers: [5, 9, 13, 17] } + # hvac_modes: { 'off': 0, cool: 1, heat: 2, dry: 3, fan_only: 4 } + # hvac_off: { registers: [1, 2, 3, 4], register_type: coil } + # target_temperature: { registers: [4, 8, 12, 16] } + # temperature: { registers: [3, 6, 9, 12], register_type: input, scale: 0.1 } # - platform: zhiremote # name: 书房空调 # sender: remote.shu_fang_yao_kong @@ -177,25 +184,6 @@ media_player: sender: remote.shu_fang_yao_kong command: viewsonic_projector sensor: device_tracker.touyingyi - # - platform: dlna_dmr - # name: 天猫精灵 - # url: http://Magic:49153/description.xml - -# camera: -# - platform: ffmpeg -# name: 书房摄像机 -# input: !secret rtsp_camera6 -# - platform: generic -# name: 餐厅摄像机 -# still_image_url: http://Camera1/last.cgi -# #stream_source: rtsp://Camera1/live/ch00_0 -# - platform: ffmpeg -# name: 过道摄像机 -# input: rtsp://Camera2/ch0_1.h264 -# - platform: generic -# name: 主卧摄像机 -# still_image_url: http://Camera5/last.cgi -# #stream_source: rtsp://Camera5/live/ch00_0 vacuum: - platform: zhimijia @@ -213,10 +201,6 @@ vacuum: zhiact: -zhimi: - username: !secret zhimi_username - password: !secret zhimi_password - zhimsg: - platform: ding name: 钉钉信使 @@ -236,8 +220,6 @@ zhimsg: model: lx04 zhibot: - # - platform: genie - # token: !secret zhibot_token - platform: genie2 file: !secret genie2bot_file text: !secret genie2bot_text @@ -259,15 +241,15 @@ zhibot: zhiaqara: name: 小米网关 key: 3ECB50168D7F4AEB - #interface: 192.168.1.2 + interface: 192.168.1.2 zhibroad: +# - name: 客厅遥控 +# host: 192.168.1.54 - name: 书房遥控 host: 192.168.1.53 - - name: 客厅遥控 - host: 192.168.1.54 - # - name: 客厅插座 - # host: 192.168.1.55 + - name: 客厅插座 + host: 192.168.1.55 zhibravia: - name: 客厅电视 @@ -294,19 +276,19 @@ lovelace: icon: mdi:home-floor-b show_in_sidebar: true filename: zhilace-type.yaml + zhilace-dash: + mode: yaml + title: 面板 + icon: mdi:microsoft + show_in_sidebar: true + filename: zhilace-dash.yaml -panel_iframe: - dash: - title: 面板 - icon: mdi:microsoft - url: /local/dash.html - -shell_command: +# shell_command: #server_off: 'ssh root@192.168.1.2 shutdown -h now' - magic_on: "adb connect 192.168.1.15 && adb -s 192.168.1.15 shell 'input keyevent 82; am start -n com.thanksmister.iot.wallpanel/.ui.activities.WelcomeActivity'" - magic_off: "adb connect 192.168.1.15 && adb -s 192.168.1.15 shell 'input keyevent 82; input keyevent 26'" - x9300d_off: 'adb connect 192.168.1.9 && adb -s 192.168.1.9 shell reboot -p' - x9400d_off: 'adb connect 192.168.1.8 && adb -s 192.168.1.8 shell reboot -p' + # magic_on: "adb connect 192.168.1.15 && adb -s 192.168.1.15 shell 'input keyevent 82; am start -n com.thanksmister.iot.wallpanel/.ui.activities.WelcomeActivity'" + # magic_off: "adb connect 192.168.1.15 && adb -s 192.168.1.15 shell 'input keyevent 82; input keyevent 26'" + # x9300d_off: 'adb connect 192.168.1.9 && adb -s 192.168.1.9 shell reboot -p' + # x9400d_off: 'adb connect 192.168.1.8 && adb -s 192.168.1.8 shell reboot -p' command_line: - switch: @@ -317,11 +299,14 @@ command_line: command_state: 'ssh -p 222 192.168.1.2 "docker inspect -f {{json\ .State.Running}} xiaoya"' value_template: '{{ value == "true" }}' scan_interval: 600 - - switch: - name: 网心云 - icon: mdi:microsoft-onedrive - command_on: 'ssh -p 222 192.168.1.2 "docker start wxedge"' - command_off: 'ssh -p 222 192.168.1.2 "docker stop wxedge"' - command_state: 'ssh -p 222 192.168.1.2 "docker inspect -f {{json\ .State.Running}} wxedge"' - value_template: '{{ value == "true" }}' - scan_interval: 600 + +fan: !include fans.yaml +mqtt: !include mqtt.yaml +light: !include lights.yaml +#sensor: !include sensors.yaml +#switch: !include switches.yaml + +# scene: !include scenes.yaml +# script: !include scripts.yaml +homekit: !include homekit.yaml +automation: !include_dir_merge_list automations diff --git a/custom_components/zhiaqara/__init__.py b/custom_components/zhiaqara/__init__.py index ebdd57a..b986894 100644 --- a/custom_components/zhiaqara/__init__.py +++ b/custom_components/zhiaqara/__init__.py @@ -28,5 +28,14 @@ async def async_setup(hass, config): CONF_KEY: conf.get(CONF_KEY), CONF_SID: gateway.sid, } - await hass.config_entries.async_add(ConfigEntry(1, DOMAIN, name, data, SOURCE_USER, unique_id=unique_id, entry_id=unique_id)) + await hass.config_entries.async_add(ConfigEntry( + version=1, + minor_version=0, + options={}, + domain=DOMAIN, + title=name, + data= data, + source=SOURCE_USER, + unique_id=unique_id, + entry_id=unique_id)) return True diff --git a/custom_components/zhibravia/__init__.py b/custom_components/zhibravia/__init__.py index 8bb1586..627f382 100644 --- a/custom_components/zhibravia/__init__.py +++ b/custom_components/zhibravia/__init__.py @@ -18,7 +18,16 @@ async def async_setup(hass, config): CONF_MAC: conf.get(CONF_MAC) or await bravia_get_mac(hass, host, pin), CONF_PIN: pin } - await hass.config_entries.async_add(ConfigEntry(1, 'braviatv', name, data, SOURCE_USER, unique_id=unique_id, entry_id=unique_id)) + await hass.config_entries.async_add(ConfigEntry( + version=1, + minor_version=0, + options={}, + domain='braviatv', + title=name, + data=data, + source=SOURCE_USER, + unique_id=unique_id, + entry_id=unique_id)) return True diff --git a/custom_components/zhibroad/__init__.py b/custom_components/zhibroad/__init__.py index 2f12642..882660c 100644 --- a/custom_components/zhibroad/__init__.py +++ b/custom_components/zhibroad/__init__.py @@ -21,8 +21,17 @@ async def async_setup(hass, config): CONF_TYPE: device.devtype, CONF_TIMEOUT: device.timeout, } - await hass.config_entries.async_add(ConfigEntry(1, 'broadlink', name, data, SOURCE_USER, unique_id=unique_id, entry_id=unique_id)) + await hass.config_entries.async_add(ConfigEntry( + version=1, + minor_version=0, + options={}, + domain='broadlink', + title=name, + data=data, + source=SOURCE_USER, + unique_id=unique_id, + entry_id=unique_id)) except Exception as e: import logging - logging.getLogger(__name__).error("Could not find %s", name) + logging.getLogger(__name__).error("Could not find %s, %s", name, e) return True diff --git a/modules/Zhi b/modules/Zhi index 15932d2..1c1538b 160000 --- a/modules/Zhi +++ b/modules/Zhi @@ -1 +1 @@ -Subproject commit 15932d2a74145116bf146e4db21794118690763d +Subproject commit 1c1538b7c4fa2795a891f7e64c53a8673b36a5c3 diff --git a/modules/ZhiBot b/modules/ZhiBot index ea33a34..0f180ca 160000 --- a/modules/ZhiBot +++ b/modules/ZhiBot @@ -1 +1 @@ -Subproject commit ea33a349aed9f462cb1cb7f581acc5a3051f62b5 +Subproject commit 0f180cac41da9c494f38bdfa1c9bd688568b59fb diff --git a/modules/ZhiCaiYun b/modules/ZhiCaiYun index ca9f260..de2f817 160000 --- a/modules/ZhiCaiYun +++ b/modules/ZhiCaiYun @@ -1 +1 @@ -Subproject commit ca9f2608b3fbf5e017806a48ca42ae3d6879ef01 +Subproject commit de2f81738d34a8e834802b9022e68e99a1039435 diff --git a/modules/ZhiMi b/modules/ZhiMi index 77401e7..c602d16 160000 --- a/modules/ZhiMi +++ b/modules/ZhiMi @@ -1 +1 @@ -Subproject commit 77401e785e3df7e57d66c8d06ecac3633d3f9fe7 +Subproject commit c602d1624d3c53f32e9e8797e0fbdd20762ac2b4 diff --git a/modules/ZhiMiJia b/modules/ZhiMiJia index 977368e..dbeb7e2 160000 --- a/modules/ZhiMiJia +++ b/modules/ZhiMiJia @@ -1 +1 @@ -Subproject commit 977368e00fceebd5f32e5c8b006f6f81bfd85fb4 +Subproject commit dbeb7e2528898f2c03763c8ffb69346fbc90731f diff --git a/modules/ZhiModBus b/modules/ZhiModBus index f5ef888..5cdd979 160000 --- a/modules/ZhiModBus +++ b/modules/ZhiModBus @@ -1 +1 @@ -Subproject commit f5ef8881b2b7487f40e4f77da3a373899ef20515 +Subproject commit 5cdd9795462de1d5ebbab261359f073477bbf5f6 diff --git a/modules/ZhiMsg b/modules/ZhiMsg index d945ce8..736d7d9 160000 --- a/modules/ZhiMsg +++ b/modules/ZhiMsg @@ -1 +1 @@ -Subproject commit d945ce8d34413db9e1bb4e7b034c794e3f05dbfe +Subproject commit 736d7d9c122fd8f2e91762d0589e1ae2b7e82ce0 diff --git a/modules/ZhiRemote b/modules/ZhiRemote index 7e66964..422256f 160000 --- a/modules/ZhiRemote +++ b/modules/ZhiRemote @@ -1 +1 @@ -Subproject commit 7e6696450290d129165e887f67b30a0ea1690d43 +Subproject commit 422256f87f5bff7071f35202e1ad227f376743a2 diff --git a/modules/ZhiSaswell b/modules/ZhiSaswell index 3db26ee..e25d22f 160000 --- a/modules/ZhiSaswell +++ b/modules/ZhiSaswell @@ -1 +1 @@ -Subproject commit 3db26ee27390df25efdd098307b1b68b45010f7a +Subproject commit e25d22ff48cce762f6eac822afce3a623000b9e9 diff --git a/mqtt.yaml b/mqtt.yaml index 000a062..25f6151 100755 --- a/mqtt.yaml +++ b/mqtt.yaml @@ -128,7 +128,7 @@ switch: command_topic: YinXiang/relay/0/set availability_topic: YinXiang/status value_template: '{% if value == "关闭" %}OFF{% else %}ON{% endif %}' - icon_template: '{% if value == "关闭" %}mdi:speaker-off{% elif value == "蓝牙" %}mdi:speaker-bluetooth{% elif value == "光纤" %}mdi:speaker-wireless{% elif value == "优盘" %}mdi:usb{% elif value == "辅助" %}mdi:video-input-component{% else %}mdi:speaker{% endif %}' + #icon_template: '{% if value == "关闭" %}mdi:speaker-off{% elif value == "蓝牙" %}mdi:speaker-bluetooth{% elif value == "光纤" %}mdi:speaker-wireless{% elif value == "优盘" %}mdi:usb{% elif value == "辅助" %}mdi:video-input-component{% else %}mdi:speaker{% endif %}' light: - name: 洗手间灯 diff --git a/zhilace-dash.yaml b/zhilace-dash.yaml new file mode 100644 index 0000000..575f375 --- /dev/null +++ b/zhilace-dash.yaml @@ -0,0 +1,3 @@ +strategy: + type: iframe + url: /local/dash.html