ARTICLE DETAIL

资讯详情

深耕郑州网站建设与运营推广的一线实战洞察。

Home Assistant 中为 Sensibo 设备启用 Climate React(Climate React)动作完全指南

Home Assistant 中为 Sensibo 设备启用 Climate React(Climate React)动作完全指南 Home Assistant 中为 Sensibo 设备启用 Climate ReactClimate React动作完全指南【免费下载链接】home-assistant.io:blue_book: Home Assistant User documentation项目地址: https://gitcode.com/GitHub_Trending/ho/home-assistant.io导读本文围绕 Home Assistant 官方文档库中的sensibo.enable_climate_react动作展开讲解如何在自动化与脚本中为 Sensibo 空调设备启用并配置 Climate React 功能——当温度、体感温度或湿度跨越你设定的阈值时设备自动切换到你预先定义的状态。读完本文你将掌握该动作在 UI 与 YAML 两种配置方式下的完整参数、完整状态full state的写法、阈值与触发类型的搭配以及如何借助sensibo.get_device_capabilities动作获取设备支持的合法取值避免因大小写或取值不匹配而调用失败。什么是 Climate ReactClimate React 是 Sensibo 设备Sensibo Sky、Sensibo Air、Sensibo Air Pro 等内置的智能恒温逻辑。其核心行为是当传感器检测到的温度temperature、体感温度feels-like temperature或湿度humidity越过你设置的阈值时设备自动切换到你在动作中定义的状态。在 Home Assistant 中这条逻辑通过sensibo.enable_climate_react动作触发。执行该动作后Home Assistant 会调用 Sensibo 云 API 完成两件事启用 Climate React动作本身自带启用效果无需先单独打开开关写入高/低两个阈值以及对应的设备状态。从集成文档 source/_integrations/sensibo.markdown 可以看到Climate React 相关的数据会以实体形式暴露给 Home Assistant包括Climate React typeTemperature / Feels like / HumidityClimate React low temperature threshold低阈值设置Climate React high temperature threshold高阈值设置同时集成的 Switches 列表中也包含Climate React开关用于在启用后随时查看或手动关闭该功能见 source/_integrations/sensibo.markdown。重要前提高/低状态high/low state是完整状态full state必须与 Sensibo API 期望的字段与取值完全一致且区分大小写。因此首次配置时最稳妥的做法是在 Sensibo 官方 App 中先完成 Climate React 的配置再通过 Get device mode capabilities 动作获取设备支持的合法取值最后写入 Home Assistant 的自动化或脚本。在 UI 中启用 Climate React如果你更习惯用可视化方式构建自动化Home Assistant 会在界面中一步步引导你完成配置。操作步骤进入设置 自动化与场景Automations scenes。打开一条已有的自动化或脚本或选择创建自动化创建新自动化。如果是新建自动化先在When何时区域添加一个触发器。脚本scripts不需要触发器它们由其他东西调用时才会运行。在Then do然后执行区域选择添加动作Add action。选择你要控制的对象在By target按目标见下文动作的目标下选择 Sensibo 空调设备。从该目标对应的动作列表中选择Sensibo: Enable Climate React。设置阈值thresholds、状态states与触发类型trigger type。点击保存。UI 中的选项选项说明Threshold high高阈值当数值高于该值时应用高阈值状态。State high threshold高阈值状态当数值高于高阈值时应用的完整状态。Threshold low低阈值当数值低于该值时应用低阈值状态。State low threshold低阈值状态当数值低于低阈值时应用的完整状态。Trigger type触发类型触发依据温度temperature、体感温度feels-like或湿度humidity。在 YAML 中使用该动作在 YAML 中动作名称为sensibo.enable_climate_react。如果你直接编写 YAML或者想确切知道 Home Assistant 底层做了什么这一节给出了技术参考字段名、类型以及哪些字段是必填的。基础示例官方文档给出如下基础示例展示了温度触发场景下的完整配置action: sensibo.enable_climate_react target: entity_id: climate.living_room data: high_temperature_threshold: 24 high_temperature_state: on: true targetTemperature: 21 mode: cool fanLevel: high temperatureUnit: C swing: stopped horizontalSwing: stopped light: on low_temperature_threshold: 19 low_temperature_state: on: true targetTemperature: 23 mode: heat fanLevel: high temperatureUnit: C swing: stopped horizontalSwing: stopped light: on smart_type: temperature这个例子的业务语义是室温高于 24 ℃ 时切换到制冷cool目标 21 ℃高风速室温低于 19 ℃ 时切换到制热heat目标 23 ℃高风速。smart_type: temperature表明触发依据是实际温度。YAML 参数详解参数类型必填说明high_temperature_thresholdfloat是当数值高于该值时应用高阈值状态。high_temperature_statemap是当数值高于高阈值时应用的完整状态。low_temperature_thresholdfloat是当数值低于该值时应用低阈值状态。low_temperature_statemap是当数值低于低阈值时应用的完整状态。smart_typestring是触发依据temperature、feelslike或humidity。完整状态full state的写法高阈值状态与低阈值状态都是完整状态full state即一次描述设备全部可设置项的映射。官方文档给出的完整状态示例为on: true fanLevel: high temperatureUnit: C targetTemperature: 23 mode: cool swing: fixedBottom horizontalSwing: fixedLeft light: on各字段说明字段含义on设备电源开关状态true/false。fanLevel风扇档位如high、medium、low等。temperatureUnit温度单位如C摄氏度、F华氏度。targetTemperature目标温度数值。modeHVAC 模式如cool、heat、dry、fan、auto、off。swing垂直摆风模式如stopped、fixedBottom等。horizontalSwing水平摆风模式如stopped、fixedLeft等。light设备指示灯状态on/off/dim。动作的目标Targets该动作必须指定目标target。目标就是动作的作用对象可以指向单个实体、设备、区域、楼层或标签Home Assistant 会对目标下所有匹配的climate实体执行动作相关通用说明见 source/_includes/actions/targets.md实体Entity某一个具体的 climate 实体例如climate.living_room。设备Device属于某台设备的所有 climate 实体。区域Area某个房间/区域内的所有 climate 实体。楼层Floor某一楼层内的所有 climate 实体。标签Label共享某个标签的所有 climate 实体。你也可以在同一个动作中混合使用多种目标类型例如同时添加一个具体实体和一个区域让动作一次性作用于两者。实战完整自动化示例场景一早晚温差自动调节UI 之外直接用 YAML 编写将上面的基础示例套进完整的自动化骨架当室温过高时自动制冷、过低时自动制热alias: Climate React - 温度自适应 triggers: - trigger: time at: 07:00:00 actions: - action: sensibo.enable_climate_react target: entity_id: climate.living_room data: high_temperature_threshold: 24 high_temperature_state: on: true targetTemperature: 21 mode: cool fanLevel: high temperatureUnit: C swing: stopped horizontalSwing: stopped light: on low_temperature_threshold: 19 low_temperature_state: on: true targetTemperature: 23 mode: heat fanLevel: high temperatureUnit: C swing: stopped horizontalSwing: stopped light: on smart_type: temperature场景二按体感温度触发将smart_type改为feelslike即可让 Climate React 依据体感温度结合湿度等因素的体感值而非实际温度来切换状态。同理改为humidity即可实现湿度过高自动除湿、湿度过低自动加湿等场景。其余阈值与状态字段的写法与温度示例完全一致。场景三结合设备能力查询动态取值由于完整状态中的取值区分大小写且必须与 Sensibo API 完全一致不同型号设备支持的fanLevel、swing、horizontalSwing等取值可能不同。最佳实践是先用sensibo.get_device_capabilities动作查询某 HVAC 模式下设备支持的所有设置及合法取值该动作只查询、不改动设备返回结果可通过response_variable保存为响应变量action: sensibo.get_device_capabilities target: entity_id: climate.living_room data: hvac_mode: cool response_variable: capabilities从返回的capabilities变量中挑选合法取值原样保持大小写填入high_temperature_state/low_temperature_state。完整的设备能力查询说明见 source/_actions/sensibo.get_device_capabilities.markdown完整状态动作见 source/_actions/sensibo.full_state.markdown其中还包含每天 18:00 设置完整状态的自动化示例可作参考。相关动作一览以下动作与sensibo.enable_climate_react配合使用效果最佳Get device mode capabilities返回所选 HVAC 模式下设备支持的设置及合法取值区分大小写是配置 Climate React 状态的前置查询工具。Full state用一条命令把完整状态一次性发送给设备Climate React 的高/低状态本质上就是两份完整状态。此外同域的关联动作还包括Enable Pure Boost在 Sensibo Pure 空气净化器上启用 Pure Boost。Enable timer为设备启用定时。Assume state在设备被物理遥控器等外部手段控制、Sensibo 与实际状态不同步时仅向 Sensibo 声明设备开关状态而不向设备发送控制命令。常见问题与注意事项Good to know完整状态必须完整合法高/低状态都是完整状态字段与取值必须与 Sensibo API 期望完全一致且所有值都区分大小写。建议先用 Get device mode capabilities 查询合法值。首次配置从 App 开始因为取值要求严格第一次配置时最省事的方式是在 Sensibo 官方 App 中先配置好 Climate React再到 Home Assistant 中查询并复用同样的状态值。动作自带启用效果执行sensibo.enable_climate_react会同时完成启用与配置无需预先单独打开 Climate React 开关。之后若想关闭可在集成的 Climate React 开关实体上操作。目标必须为 climate 实体该动作面向空调设备目标解析为 climate 实体如climate.living_room。在自动化 UI 中可通过实体、设备、区域、楼层或标签指定。设备支持决定字段可用性根据 source/_integrations/sensibo.markdown 中列出的支持设备Climate React 主要面向 Sky、Air、Air Pro 等空调控制设备不同设备支持的设置项不同只应提供设备支持的那些字段。总结sensibo.enable_climate_react是 Home Assistant 中把 Sensibo 的智能恒温能力接入自动化体系的关键动作。本文完整覆盖了其 UI 配置路径、YAML 参数high_temperature_threshold、high_temperature_state、low_temperature_threshold、low_temperature_state、smart_type、完整状态写法、目标指定方式以及配套的sensibo.get_device_capabilities查询流程。只要严格保证状态值与 Sensibo API 一致区分大小写、只填写设备支持的字段即可实现温度/体感/湿度越界自动切换设备状态的自动化恒温策略。【免费下载链接】home-assistant.io:blue_book: Home Assistant User documentation项目地址: https://gitcode.com/GitHub_Trending/ho/home-assistant.io创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考
返回列表