|
发表于 2021-7-21 23:13:08
|
显示全部楼层
照着你的建议改了下代码,发现aircon实体建立了,但是intergration里面还是只有传感器的5个entity,没有空调的entity
2021-07-21 22:48:21 DEBUG (MainThread) [custom_components.ds_air.climate] create aircon:
2021-07-21 22:48:21 DEBUG (MainThread) [custom_components.ds_air.climate] {'alias': '客厅', 'id': 0, 'name': '', 'room_id': 1, 'unit_id': 0, 'auto_dry_mode': 0, 'auto_mode': 0, 'bath_room': False, 'new_air_con': False, 'cool_mode': 1, 'dry_mode': 1, 'fan_dire_auto': 0, 'fan_direction1': <EnumFanDirection.FIX: 0>, 'fan_direction2': <EnumFanDirection.FIX: 0>, 'fan_volume': <EnumFanVolume.STEP_5: 5>, 'fan_volume_auto': 1, 'heat_mode': 0, 'more_dry_mode': 0, 'out_door_run_cond': <EnumOutDoorRunCond.COLD: 2>, 'pre_heat_mode': 0, 'relax_mode': 0, 'sleep_mode': 0, 'ventilation_mode': 1, 'status': <custom_components.ds_air.ds_air_service.dao.AirConStatus object at 0x7f2a5196e430>}
2021-07-21 22:48:21 DEBUG (MainThread) [custom_components.ds_air.climate] {'current_temp': 0, 'setted_temp': 265, 'switch': <Switch.OFF: 0>, 'air_flow': <AirFlow.SUPER_STRONG: 4>, 'breathe': <Breathe.CLOSE: 0>, 'fan_direction1': <FanDirection.INVALID: 0>, 'fan_direction2': <FanDirection.INVALID: 0>, 'humidity': <Humidity.STEP1: 1>, 'mode': <Mode.COLD: 0>}
2021-07-21 22:48:21 DEBUG (MainThread) [custom_components.ds_air.climate] create aircon:
2021-07-21 22:48:21 DEBUG (MainThread) [custom_components.ds_air.climate] {'alias': '次卧', 'id': 0, 'name': '', 'room_id': 2, 'unit_id': 0, 'auto_dry_mode': 0, 'auto_mode': 0, 'bath_room': False, 'new_air_con': False, 'cool_mode': 1, 'dry_mode': 1, 'fan_dire_auto': 0, 'fan_direction1': <EnumFanDirection.FIX: 0>, 'fan_direction2': <EnumFanDirection.FIX: 0>, 'fan_volume': <EnumFanVolume.STEP_5: 5>, 'fan_volume_auto': 1, 'heat_mode': 0, 'more_dry_mode': 0, 'out_door_run_cond': <EnumOutDoorRunCond.COLD: 2>, 'pre_heat_mode': 0, 'relax_mode': 0, 'sleep_mode': 0, 'ventilation_mode': 1, 'status': <custom_components.ds_air.ds_air_service.dao.AirConStatus object at 0x7f2a519792b0>}
2021-07-21 22:48:21 DEBUG (MainThread) [custom_components.ds_air.climate] {'current_temp': 0, 'setted_temp': 270, 'switch': <Switch.OFF: 0>, 'air_flow': <AirFlow.SUPER_WEAK: 0>, 'breathe': <Breathe.CLOSE: 0>, 'fan_direction1': <FanDirection.INVALID: 0>, 'fan_direction2': <FanDirection.INVALID: 0>, 'humidity': <Humidity.STEP1: 1>, 'mode': <Mode.COLD: 0>}
2021-07-21 22:48:21 DEBUG (MainThread) [custom_components.ds_air.climate] create aircon:
2021-07-21 22:48:21 DEBUG (MainThread) [custom_components.ds_air.climate] {'alias': '餐厅', 'id': 0, 'name': '', 'room_id': 3, 'unit_id': 0, 'auto_dry_mode': 0, 'auto_mode': 0, 'bath_room': False, 'new_air_con': False, 'cool_mode': 1, 'dry_mode': 1, 'fan_dire_auto': 0, 'fan_direction1': <EnumFanDirection.FIX: 0>, 'fan_direction2': <EnumFanDirection.FIX: 0>, 'fan_volume': <EnumFanVolume.STEP_5: 5>, 'fan_volume_auto': 1, 'heat_mode': 0, 'more_dry_mode': 0, 'out_door_run_cond': <EnumOutDoorRunCond.COLD: 2>, 'pre_heat_mode': 0, 'relax_mode': 0, 'sleep_mode': 0, 'ventilation_mode': 1, 'status': <custom_components.ds_air.ds_air_service.dao.AirConStatus object at 0x7f2a51979310>}
2021-07-21 22:48:21 DEBUG (MainThread) [custom_components.ds_air.climate] {'current_temp': 0, 'setted_temp': 265, 'switch': <Switch.OFF: 0>, 'air_flow': <AirFlow.STRONG: 3>, 'breathe': <Breathe.CLOSE: 0>, 'fan_direction1': <FanDirection.INVALID: 0>, 'fan_direction2': <FanDirection.INVALID: 0>, 'humidity': <Humidity.STEP1: 1>, 'mode': <Mode.COLD: 0>}
2021-07-21 22:48:21 DEBUG (MainThread) [custom_components.ds_air.climate] create aircon:
2021-07-21 22:48:21 DEBUG (MainThread) [custom_components.ds_air.climate] {'alias': '主卧', 'id': 0, 'name': '', 'room_id': 4, 'unit_id': 0, 'auto_dry_mode': 0, 'auto_mode': 0, 'bath_room': False, 'new_air_con': False, 'cool_mode': 1, 'dry_mode': 1, 'fan_dire_auto': 0, 'fan_direction1': <EnumFanDirection.FIX: 0>, 'fan_direction2': <EnumFanDirection.FIX: 0>, 'fan_volume': <EnumFanVolume.STEP_5: 5>, 'fan_volume_auto': 1, 'heat_mode': 0, 'more_dry_mode': 0, 'out_door_run_cond': <EnumOutDoorRunCond.COLD: 2>, 'pre_heat_mode': 0, 'relax_mode': 0, 'sleep_mode': 0, 'ventilation_mode': 1, 'status': <custom_components.ds_air.ds_air_service.dao.AirConStatus object at 0x7f2a51979370>}
2021-07-21 22:48:21 DEBUG (MainThread) [custom_components.ds_air.climate] {'current_temp': 0, 'setted_temp': 265, 'switch': <Switch.ON: 1>, 'air_flow': <AirFlow.AUTO: 5>, 'breathe': <Breathe.CLOSE: 0>, 'fan_direction1': <FanDirection.INVALID: 0>, 'fan_direction2': <FanDirection.INVALID: 0>, 'humidity': <Humidity.STEP1: 1>, 'mode': <Mode.COLD: 0>}
2021-07-21 22:48:21 DEBUG (MainThread) [custom_components.ds_air.climate] create aircon:
2021-07-21 22:48:21 DEBUG (MainThread) [custom_components.ds_air.climate] {'alias': '书房', 'id': 0, 'name': '', 'room_id': 5, 'unit_id': 0, 'auto_dry_mode': 0, 'auto_mode': 0, 'bath_room': False, 'new_air_con': False, 'cool_mode': 1, 'dry_mode': 1, 'fan_dire_auto': 0, 'fan_direction1': <EnumFanDirection.FIX: 0>, 'fan_direction2': <EnumFanDirection.FIX: 0>, 'fan_volume': <EnumFanVolume.STEP_5: 5>, 'fan_volume_auto': 1, 'heat_mode': 0, 'more_dry_mode': 0, 'out_door_run_cond': <EnumOutDoorRunCond.COLD: 2>, 'pre_heat_mode': 0, 'relax_mode': 0, 'sleep_mode': 0, 'ventilation_mode': 1, 'status': <custom_components.ds_air.ds_air_service.dao.AirConStatus object at 0x7f2a52117100>}
2021-07-21 22:48:21 DEBUG (MainThread) [custom_components.ds_air.climate] {'current_temp': 0, 'setted_temp': 270, 'switch': <Switch.ON: 1>, 'air_flow': <AirFlow.SUPER_STRONG: 4>, 'breathe': <Breathe.CLOSE: 0>, 'fan_direction1': <FanDirection.INVALID: 0>, 'fan_direction2': <FanDirection.INVALID: 0>, 'humidity': <Humidity.STEP1: 1>, 'mode': <Mode.COLD: 0>}
2021-07-21 22:48:21 DEBUG (MainThread) [custom_components.ds_air.climate] async_setup_entry
|
|