Adds initial support for tuya category xnyjcn (solar inverter) (#151549)
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>pull/151612/head
parent
b9427deed2
commit
c12b638b3d
|
@ -113,6 +113,7 @@ class DPCode(StrEnum):
|
|||
ARM_DOWN_PERCENT = "arm_down_percent"
|
||||
ARM_UP_PERCENT = "arm_up_percent"
|
||||
ATMOSPHERIC_PRESSTURE = "atmospheric_pressture" # Typo is in Tuya API
|
||||
BACKUP_RESERVE = "backup_reserve"
|
||||
BASIC_ANTI_FLICKER = "basic_anti_flicker"
|
||||
BASIC_DEVICE_VOLUME = "basic_device_volume"
|
||||
BASIC_FLIP = "basic_flip"
|
||||
|
@ -213,6 +214,7 @@ class DPCode(StrEnum):
|
|||
FAULT = "fault"
|
||||
FEED_REPORT = "feed_report"
|
||||
FEED_STATE = "feed_state"
|
||||
FEEDIN_POWER_LIMIT_ENABLE = "feedin_power_limit_enable"
|
||||
FILTER = "filter"
|
||||
FILTER_DURATION = "filter_life" # Filter duration (hours)
|
||||
FILTER_LIFE = "filter" # Filter life (percentage)
|
||||
|
@ -267,6 +269,7 @@ class DPCode(StrEnum):
|
|||
MUFFLING = "muffling" # Muffling
|
||||
NEAR_DETECTION = "near_detection"
|
||||
OPPOSITE = "opposite"
|
||||
OUTPUT_POWER_LIMIT = "output_power_limit"
|
||||
OXYGEN = "oxygen" # Oxygen bar
|
||||
PAUSE = "pause"
|
||||
PERCENT_CONTROL = "percent_control"
|
||||
|
|
|
@ -399,6 +399,21 @@ NUMBERS: dict[str, tuple[NumberEntityDescription, ...]] = {
|
|||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
),
|
||||
# Micro Storage Inverter
|
||||
# Energy storage and solar PV inverter system with monitoring capabilities
|
||||
"xnyjcn": (
|
||||
NumberEntityDescription(
|
||||
key=DPCode.BACKUP_RESERVE,
|
||||
translation_key="battery_backup_reserve",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
NumberEntityDescription(
|
||||
key=DPCode.OUTPUT_POWER_LIMIT,
|
||||
translation_key="inverter_output_power_limit",
|
||||
device_class=NumberDeviceClass.POWER,
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
),
|
||||
# Tank Level Sensor
|
||||
# Note: Undocumented
|
||||
"ywcgq": (
|
||||
|
|
|
@ -352,6 +352,15 @@ SELECTS: dict[str, tuple[SelectEntityDescription, ...]] = {
|
|||
translation_placeholders={"index": "2"},
|
||||
),
|
||||
),
|
||||
# Micro Storage Inverter
|
||||
# Energy storage and solar PV inverter system with monitoring capabilities
|
||||
"xnyjcn": (
|
||||
SelectEntityDescription(
|
||||
key=DPCode.WORK_MODE,
|
||||
translation_key="inverter_work_mode",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
),
|
||||
}
|
||||
|
||||
# Socket (duplicate of `kg`)
|
||||
|
|
|
@ -226,11 +226,17 @@
|
|||
"alarm_minimum": {
|
||||
"name": "Alarm minimum"
|
||||
},
|
||||
"battery_backup_reserve": {
|
||||
"name": "Battery backup reserve"
|
||||
},
|
||||
"installation_height": {
|
||||
"name": "Installation height"
|
||||
},
|
||||
"maximum_liquid_depth": {
|
||||
"name": "Maximum liquid depth"
|
||||
},
|
||||
"inverter_output_power_limit": {
|
||||
"name": "Inverter output power limit"
|
||||
}
|
||||
},
|
||||
"select": {
|
||||
|
@ -496,6 +502,14 @@
|
|||
"smart": "Smart",
|
||||
"interim": "Interim"
|
||||
}
|
||||
},
|
||||
"inverter_work_mode": {
|
||||
"name": "Inverter work mode",
|
||||
"state": {
|
||||
"self_powered": "Self-powered",
|
||||
"time_of_use": "Time of use",
|
||||
"manual": "Manual mode"
|
||||
}
|
||||
}
|
||||
},
|
||||
"sensor": {
|
||||
|
@ -919,6 +933,9 @@
|
|||
},
|
||||
"frost_protection": {
|
||||
"name": "Frost protection"
|
||||
},
|
||||
"output_power_limit": {
|
||||
"name": "Output power limit"
|
||||
}
|
||||
},
|
||||
"valve": {
|
||||
|
|
|
@ -873,6 +873,15 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = {
|
|||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
),
|
||||
# Micro Storage Inverter
|
||||
# Energy storage and solar PV inverter system with monitoring capabilities
|
||||
"xnyjcn": (
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.FEEDIN_POWER_LIMIT_ENABLE,
|
||||
translation_key="output_power_limit",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
),
|
||||
# Diffuser
|
||||
# https://developer.tuya.com/en/docs/iot/categoryxxj?id=Kaiuz1f9mo6bl
|
||||
"xxj": (
|
||||
|
|
|
@ -217,6 +217,7 @@ DEVICE_MOCKS = [
|
|||
"wxkg_ja5osu5g", # https://github.com/orgs/home-assistant/discussions/482
|
||||
"wxkg_l8yaz4um5b3pwyvf", # https://github.com/home-assistant/core/issues/93975
|
||||
"xdd_shx9mmadyyeaq88t", # https://github.com/home-assistant/core/issues/151141
|
||||
"xnyjcn_pb0tc75khaik8qbg", # https://github.com/home-assistant/core/pull/149237
|
||||
"ydkt_jevroj5aguwdbs2e", # https://github.com/orgs/home-assistant/discussions/288
|
||||
"ygsb_l6ax0u6jwbz82atk", # https://github.com/home-assistant/core/issues/146319
|
||||
"ykq_bngwdjsr", # https://github.com/orgs/home-assistant/discussions/482
|
||||
|
|
|
@ -0,0 +1,794 @@
|
|||
{
|
||||
"endpoint": "https://apigw.tuyacn.com",
|
||||
"mqtt_connected": true,
|
||||
"disabled_by": null,
|
||||
"disabled_polling": false,
|
||||
"name": "CBE Pro 2",
|
||||
"category": "xnyjcn",
|
||||
"product_id": "pb0tc75khaik8qbg",
|
||||
"product_name": "CBE Pro",
|
||||
"online": true,
|
||||
"sub": false,
|
||||
"time_zone": "+08:00",
|
||||
"active_time": "2025-06-25T11:36:33+00:00",
|
||||
"create_time": "2025-06-25T11:36:33+00:00",
|
||||
"update_time": "2025-06-25T11:36:33+00:00",
|
||||
"function": {
|
||||
"cell_heating": {
|
||||
"type": "Boolean",
|
||||
"value": {}
|
||||
},
|
||||
"expansion_pack_count": {
|
||||
"type": "Integer",
|
||||
"value": {
|
||||
"unit": "",
|
||||
"min": 0,
|
||||
"max": 99999,
|
||||
"scale": 0,
|
||||
"step": 1
|
||||
}
|
||||
},
|
||||
"grid_power": {
|
||||
"type": "Integer",
|
||||
"value": {
|
||||
"unit": "kW",
|
||||
"min": -100000,
|
||||
"max": 100000,
|
||||
"scale": 3,
|
||||
"step": 1
|
||||
}
|
||||
},
|
||||
"main_soc": {
|
||||
"type": "Integer",
|
||||
"value": {
|
||||
"unit": "%",
|
||||
"min": 0,
|
||||
"max": 100,
|
||||
"scale": 0,
|
||||
"step": 1
|
||||
}
|
||||
},
|
||||
"expansion_pack1_soc": {
|
||||
"type": "Integer",
|
||||
"value": {
|
||||
"unit": "%",
|
||||
"min": 0,
|
||||
"max": 100,
|
||||
"scale": 0,
|
||||
"step": 1
|
||||
}
|
||||
},
|
||||
"expansion_pack2_soc": {
|
||||
"type": "Integer",
|
||||
"value": {
|
||||
"unit": "%",
|
||||
"min": 0,
|
||||
"max": 100,
|
||||
"scale": 0,
|
||||
"step": 1
|
||||
}
|
||||
},
|
||||
"expansion_pack3_soc": {
|
||||
"type": "Integer",
|
||||
"value": {
|
||||
"unit": "%",
|
||||
"min": 0,
|
||||
"max": 100,
|
||||
"scale": 0,
|
||||
"step": 1
|
||||
}
|
||||
},
|
||||
"expansion_pack4_soc": {
|
||||
"type": "Integer",
|
||||
"value": {
|
||||
"unit": "%",
|
||||
"min": 0,
|
||||
"max": 100,
|
||||
"scale": 0,
|
||||
"step": 1
|
||||
}
|
||||
},
|
||||
"expansion_pack5_soc": {
|
||||
"type": "Integer",
|
||||
"value": {
|
||||
"unit": "%",
|
||||
"min": 0,
|
||||
"max": 100,
|
||||
"scale": 0,
|
||||
"step": 1
|
||||
}
|
||||
},
|
||||
"pv_power_channel_3": {
|
||||
"type": "Integer",
|
||||
"value": {
|
||||
"unit": "W",
|
||||
"min": 0,
|
||||
"max": 1000,
|
||||
"scale": 0,
|
||||
"step": 1
|
||||
}
|
||||
},
|
||||
"pv_power_channel_4": {
|
||||
"type": "Integer",
|
||||
"value": {
|
||||
"unit": "W",
|
||||
"min": 0,
|
||||
"max": 1000,
|
||||
"scale": 0,
|
||||
"step": 1
|
||||
}
|
||||
},
|
||||
"offgrid1_export_power": {
|
||||
"type": "Integer",
|
||||
"value": {
|
||||
"unit": "W",
|
||||
"min": 0,
|
||||
"max": 99999,
|
||||
"scale": 0,
|
||||
"step": 1
|
||||
}
|
||||
},
|
||||
"cuml_e_export_offgrid1": {
|
||||
"type": "Integer",
|
||||
"value": {
|
||||
"unit": "Wh",
|
||||
"min": 0,
|
||||
"max": 99999,
|
||||
"scale": 0,
|
||||
"step": 1
|
||||
}
|
||||
},
|
||||
"backup_reserve": {
|
||||
"type": "Integer",
|
||||
"value": {
|
||||
"unit": "%",
|
||||
"min": 0,
|
||||
"max": 100,
|
||||
"scale": 0,
|
||||
"step": 1
|
||||
}
|
||||
},
|
||||
"work_mode": {
|
||||
"type": "Enum",
|
||||
"value": {
|
||||
"range": ["self_powered", "time_of_use"]
|
||||
}
|
||||
},
|
||||
"function_set": {
|
||||
"type": "Raw",
|
||||
"value": {
|
||||
"maxlen": 128
|
||||
}
|
||||
},
|
||||
"output_power_limit": {
|
||||
"type": "Integer",
|
||||
"value": {
|
||||
"unit": "W",
|
||||
"min": 0,
|
||||
"max": 100000,
|
||||
"scale": 0,
|
||||
"step": 1
|
||||
}
|
||||
},
|
||||
"feedin_power_limit_enable": {
|
||||
"type": "Boolean",
|
||||
"value": {}
|
||||
},
|
||||
"feedin_power_limit": {
|
||||
"type": "Integer",
|
||||
"value": {
|
||||
"unit": "W",
|
||||
"min": 0,
|
||||
"max": 100000,
|
||||
"scale": 0,
|
||||
"step": 1
|
||||
}
|
||||
},
|
||||
"country_code": {
|
||||
"type": "String",
|
||||
"value": {
|
||||
"maxlen": 255
|
||||
}
|
||||
},
|
||||
"indicator_light_mode": {
|
||||
"type": "Enum",
|
||||
"value": {
|
||||
"range": ["eco", "on", "off"]
|
||||
}
|
||||
},
|
||||
"smart_meter_type": {
|
||||
"type": "Enum",
|
||||
"value": {
|
||||
"range": ["none", "ty_lan", "ty_rs485"]
|
||||
}
|
||||
},
|
||||
"recalibrate_battery": {
|
||||
"type": "Boolean",
|
||||
"value": {}
|
||||
},
|
||||
"offgrid1_export_enable": {
|
||||
"type": "Boolean",
|
||||
"value": {}
|
||||
},
|
||||
"peak_shaving_enable": {
|
||||
"type": "Boolean",
|
||||
"value": {}
|
||||
},
|
||||
"peak_shaving_threshold": {
|
||||
"type": "Integer",
|
||||
"value": {
|
||||
"unit": "W",
|
||||
"min": 0,
|
||||
"max": 30000,
|
||||
"scale": 0,
|
||||
"step": 1
|
||||
}
|
||||
},
|
||||
"vibe_light_scene": {
|
||||
"type": "Raw",
|
||||
"value": {
|
||||
"maxlen": 128
|
||||
}
|
||||
},
|
||||
"user_schedule": {
|
||||
"type": "Raw",
|
||||
"value": {
|
||||
"maxlen": 128
|
||||
}
|
||||
},
|
||||
"offgrid1_mode": {
|
||||
"type": "Enum",
|
||||
"value": {
|
||||
"range": ["backup", "plugin"]
|
||||
}
|
||||
},
|
||||
"inverter_input_power_limit": {
|
||||
"type": "Integer",
|
||||
"value": {
|
||||
"unit": "kW",
|
||||
"min": 0,
|
||||
"max": 2500,
|
||||
"scale": 3,
|
||||
"step": 1
|
||||
}
|
||||
},
|
||||
"panel_heartbeat": {
|
||||
"type": "Boolean",
|
||||
"value": {}
|
||||
},
|
||||
"backup_reserve_recommanded": {
|
||||
"type": "Integer",
|
||||
"value": {
|
||||
"unit": "%",
|
||||
"min": 0,
|
||||
"max": 100,
|
||||
"scale": 0,
|
||||
"step": 1
|
||||
}
|
||||
},
|
||||
"remote_pair": {
|
||||
"type": "Boolean",
|
||||
"value": {}
|
||||
},
|
||||
"regulation_grid_export_p_limit": {
|
||||
"type": "Integer",
|
||||
"value": {
|
||||
"unit": "W",
|
||||
"min": 0,
|
||||
"max": 30000,
|
||||
"scale": 0,
|
||||
"step": 1
|
||||
}
|
||||
},
|
||||
"inverter_status": {
|
||||
"type": "Raw",
|
||||
"value": {
|
||||
"maxlen": 128
|
||||
}
|
||||
},
|
||||
"command_receive": {
|
||||
"type": "Raw",
|
||||
"value": {
|
||||
"maxlen": 128
|
||||
}
|
||||
},
|
||||
"command_send": {
|
||||
"type": "Raw",
|
||||
"value": {
|
||||
"maxlen": 128
|
||||
}
|
||||
}
|
||||
},
|
||||
"status_range": {
|
||||
"serial_number": {
|
||||
"type": "String",
|
||||
"value": {
|
||||
"maxlen": 255
|
||||
}
|
||||
},
|
||||
"battery_capacity": {
|
||||
"type": "Integer",
|
||||
"value": {
|
||||
"unit": "kW\u00b7h",
|
||||
"min": 0,
|
||||
"max": 1000000,
|
||||
"scale": 3,
|
||||
"step": 1
|
||||
}
|
||||
},
|
||||
"error_code": {
|
||||
"type": "String",
|
||||
"value": {
|
||||
"maxlen": 255
|
||||
}
|
||||
},
|
||||
"connection_state": {
|
||||
"type": "Enum",
|
||||
"value": {
|
||||
"range": ["paired_connected", "unpaired_uncon", "paired_uncon"]
|
||||
}
|
||||
},
|
||||
"meter_signal_strength": {
|
||||
"type": "Integer",
|
||||
"value": {
|
||||
"unit": "dBm",
|
||||
"min": 0,
|
||||
"max": 255,
|
||||
"scale": 0,
|
||||
"step": 1
|
||||
}
|
||||
},
|
||||
"hardware_version": {
|
||||
"type": "String",
|
||||
"value": {
|
||||
"maxlen": 255
|
||||
}
|
||||
},
|
||||
"system_version": {
|
||||
"type": "String",
|
||||
"value": {
|
||||
"maxlen": 255
|
||||
}
|
||||
},
|
||||
"cell_heating": {
|
||||
"type": "Boolean",
|
||||
"value": {}
|
||||
},
|
||||
"expansion_pack_count": {
|
||||
"type": "Integer",
|
||||
"value": {
|
||||
"unit": "",
|
||||
"min": 0,
|
||||
"max": 99999,
|
||||
"scale": 0,
|
||||
"step": 1
|
||||
}
|
||||
},
|
||||
"pv_power_total": {
|
||||
"type": "Integer",
|
||||
"value": {
|
||||
"unit": "kW",
|
||||
"min": 0,
|
||||
"max": 100000,
|
||||
"scale": 3,
|
||||
"step": 1
|
||||
}
|
||||
},
|
||||
"pv_power_channel_1": {
|
||||
"type": "Integer",
|
||||
"value": {
|
||||
"unit": "kW",
|
||||
"min": 0,
|
||||
"max": 100000,
|
||||
"scale": 3,
|
||||
"step": 1
|
||||
}
|
||||
},
|
||||
"pv_power_channel_2": {
|
||||
"type": "Integer",
|
||||
"value": {
|
||||
"unit": "kW",
|
||||
"min": 0,
|
||||
"max": 100000,
|
||||
"scale": 3,
|
||||
"step": 1
|
||||
}
|
||||
},
|
||||
"current_soc": {
|
||||
"type": "Integer",
|
||||
"value": {
|
||||
"unit": "%",
|
||||
"min": 0,
|
||||
"max": 100,
|
||||
"scale": 0,
|
||||
"step": 1
|
||||
}
|
||||
},
|
||||
"charge_discharge": {
|
||||
"type": "Enum",
|
||||
"value": {
|
||||
"range": ["charging", "discharging", "idle"]
|
||||
}
|
||||
},
|
||||
"battery_power": {
|
||||
"type": "Integer",
|
||||
"value": {
|
||||
"unit": "kW",
|
||||
"min": -2500000,
|
||||
"max": 2500000,
|
||||
"scale": 3,
|
||||
"step": 1
|
||||
}
|
||||
},
|
||||
"grid_power": {
|
||||
"type": "Integer",
|
||||
"value": {
|
||||
"unit": "kW",
|
||||
"min": -100000,
|
||||
"max": 100000,
|
||||
"scale": 3,
|
||||
"step": 1
|
||||
}
|
||||
},
|
||||
"inverter_output_power": {
|
||||
"type": "Integer",
|
||||
"value": {
|
||||
"unit": "kW",
|
||||
"min": -20000,
|
||||
"max": 20000,
|
||||
"scale": 3,
|
||||
"step": 1
|
||||
}
|
||||
},
|
||||
"main_soc": {
|
||||
"type": "Integer",
|
||||
"value": {
|
||||
"unit": "%",
|
||||
"min": 0,
|
||||
"max": 100,
|
||||
"scale": 0,
|
||||
"step": 1
|
||||
}
|
||||
},
|
||||
"expansion_pack1_soc": {
|
||||
"type": "Integer",
|
||||
"value": {
|
||||
"unit": "%",
|
||||
"min": 0,
|
||||
"max": 100,
|
||||
"scale": 0,
|
||||
"step": 1
|
||||
}
|
||||
},
|
||||
"expansion_pack2_soc": {
|
||||
"type": "Integer",
|
||||
"value": {
|
||||
"unit": "%",
|
||||
"min": 0,
|
||||
"max": 100,
|
||||
"scale": 0,
|
||||
"step": 1
|
||||
}
|
||||
},
|
||||
"expansion_pack3_soc": {
|
||||
"type": "Integer",
|
||||
"value": {
|
||||
"unit": "%",
|
||||
"min": 0,
|
||||
"max": 100,
|
||||
"scale": 0,
|
||||
"step": 1
|
||||
}
|
||||
},
|
||||
"expansion_pack4_soc": {
|
||||
"type": "Integer",
|
||||
"value": {
|
||||
"unit": "%",
|
||||
"min": 0,
|
||||
"max": 100,
|
||||
"scale": 0,
|
||||
"step": 1
|
||||
}
|
||||
},
|
||||
"expansion_pack5_soc": {
|
||||
"type": "Integer",
|
||||
"value": {
|
||||
"unit": "%",
|
||||
"min": 0,
|
||||
"max": 100,
|
||||
"scale": 0,
|
||||
"step": 1
|
||||
}
|
||||
},
|
||||
"pv_power_channel_3": {
|
||||
"type": "Integer",
|
||||
"value": {
|
||||
"unit": "W",
|
||||
"min": 0,
|
||||
"max": 1000,
|
||||
"scale": 0,
|
||||
"step": 1
|
||||
}
|
||||
},
|
||||
"pv_power_channel_4": {
|
||||
"type": "Integer",
|
||||
"value": {
|
||||
"unit": "W",
|
||||
"min": 0,
|
||||
"max": 1000,
|
||||
"scale": 0,
|
||||
"step": 1
|
||||
}
|
||||
},
|
||||
"offgrid1_export_power": {
|
||||
"type": "Integer",
|
||||
"value": {
|
||||
"unit": "W",
|
||||
"min": 0,
|
||||
"max": 99999,
|
||||
"scale": 0,
|
||||
"step": 1
|
||||
}
|
||||
},
|
||||
"cumulative_energy_generated_pv": {
|
||||
"type": "Integer",
|
||||
"value": {
|
||||
"unit": "kW\u00b7h",
|
||||
"min": 0,
|
||||
"max": 999999999,
|
||||
"scale": 3,
|
||||
"step": 1
|
||||
}
|
||||
},
|
||||
"cumulative_energy_output_inv": {
|
||||
"type": "Integer",
|
||||
"value": {
|
||||
"unit": "kW\u00b7h",
|
||||
"min": 0,
|
||||
"max": 999999999,
|
||||
"scale": 3,
|
||||
"step": 1
|
||||
}
|
||||
},
|
||||
"cumulative_energy_discharged": {
|
||||
"type": "Integer",
|
||||
"value": {
|
||||
"unit": "kW\u00b7h",
|
||||
"min": 0,
|
||||
"max": 999999999,
|
||||
"scale": 3,
|
||||
"step": 1
|
||||
}
|
||||
},
|
||||
"cumulative_energy_charged": {
|
||||
"type": "Integer",
|
||||
"value": {
|
||||
"unit": "kW\u00b7h",
|
||||
"min": 0,
|
||||
"max": 999999999,
|
||||
"scale": 3,
|
||||
"step": 1
|
||||
}
|
||||
},
|
||||
"cumulative_energy_charged_pv": {
|
||||
"type": "Integer",
|
||||
"value": {
|
||||
"unit": "kW\u00b7h",
|
||||
"min": 0,
|
||||
"max": 999999999,
|
||||
"scale": 3,
|
||||
"step": 1
|
||||
}
|
||||
},
|
||||
"cumulative_energy_charged_grid": {
|
||||
"type": "Integer",
|
||||
"value": {
|
||||
"unit": "kW\u00b7h",
|
||||
"min": 0,
|
||||
"max": 999999999,
|
||||
"scale": 3,
|
||||
"step": 1
|
||||
}
|
||||
},
|
||||
"cuml_e_export_offgrid1": {
|
||||
"type": "Integer",
|
||||
"value": {
|
||||
"unit": "Wh",
|
||||
"min": 0,
|
||||
"max": 99999,
|
||||
"scale": 0,
|
||||
"step": 1
|
||||
}
|
||||
},
|
||||
"backup_reserve": {
|
||||
"type": "Integer",
|
||||
"value": {
|
||||
"unit": "%",
|
||||
"min": 0,
|
||||
"max": 100,
|
||||
"scale": 0,
|
||||
"step": 1
|
||||
}
|
||||
},
|
||||
"work_mode": {
|
||||
"type": "Enum",
|
||||
"value": {
|
||||
"range": ["self_powered", "time_of_use"]
|
||||
}
|
||||
},
|
||||
"function_set": {
|
||||
"type": "Raw",
|
||||
"value": {
|
||||
"maxlen": 128
|
||||
}
|
||||
},
|
||||
"output_power_limit": {
|
||||
"type": "Integer",
|
||||
"value": {
|
||||
"unit": "W",
|
||||
"min": 0,
|
||||
"max": 100000,
|
||||
"scale": 0,
|
||||
"step": 1
|
||||
}
|
||||
},
|
||||
"feedin_power_limit": {
|
||||
"type": "Integer",
|
||||
"value": {
|
||||
"unit": "W",
|
||||
"min": 0,
|
||||
"max": 100000,
|
||||
"scale": 0,
|
||||
"step": 1
|
||||
}
|
||||
},
|
||||
"feedin_power_limit_enable": {
|
||||
"type": "Boolean",
|
||||
"value": {}
|
||||
},
|
||||
"country_code": {
|
||||
"type": "String",
|
||||
"value": {
|
||||
"maxlen": 255
|
||||
}
|
||||
},
|
||||
"indicator_light_mode": {
|
||||
"type": "Enum",
|
||||
"value": {
|
||||
"range": ["eco", "on", "off"]
|
||||
}
|
||||
},
|
||||
"smart_meter_type": {
|
||||
"type": "Enum",
|
||||
"value": {
|
||||
"range": ["none", "ty_lan", "ty_rs485"]
|
||||
}
|
||||
},
|
||||
"recalibrate_battery": {
|
||||
"type": "Boolean",
|
||||
"value": {}
|
||||
},
|
||||
"offgrid1_export_enable": {
|
||||
"type": "Boolean",
|
||||
"value": {}
|
||||
},
|
||||
"peak_shaving_enable": {
|
||||
"type": "Boolean",
|
||||
"value": {}
|
||||
},
|
||||
"peak_shaving_threshold": {
|
||||
"type": "Integer",
|
||||
"value": {
|
||||
"unit": "W",
|
||||
"min": 0,
|
||||
"max": 30000,
|
||||
"scale": 0,
|
||||
"step": 1
|
||||
}
|
||||
},
|
||||
"vibe_light_scene": {
|
||||
"type": "Raw",
|
||||
"value": {
|
||||
"maxlen": 128
|
||||
}
|
||||
},
|
||||
"user_schedule": {
|
||||
"type": "Raw",
|
||||
"value": {
|
||||
"maxlen": 128
|
||||
}
|
||||
},
|
||||
"offgrid1_mode": {
|
||||
"type": "Enum",
|
||||
"value": {
|
||||
"range": ["backup", "plugin"]
|
||||
}
|
||||
},
|
||||
"timestamp": {
|
||||
"type": "String",
|
||||
"value": {
|
||||
"maxlen": 255
|
||||
}
|
||||
},
|
||||
"remote_pair": {
|
||||
"type": "Boolean",
|
||||
"value": {}
|
||||
},
|
||||
"inverter_status": {
|
||||
"type": "Raw",
|
||||
"value": {
|
||||
"maxlen": 128
|
||||
}
|
||||
},
|
||||
"command_receive": {
|
||||
"type": "Raw",
|
||||
"value": {
|
||||
"maxlen": 128
|
||||
}
|
||||
},
|
||||
"command_send": {
|
||||
"type": "Raw",
|
||||
"value": {
|
||||
"maxlen": 128
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"serial_number": "sn1234",
|
||||
"battery_capacity": 0,
|
||||
"error_code": "",
|
||||
"connection_state": "paired_connected",
|
||||
"meter_signal_strength": 0,
|
||||
"hardware_version": "",
|
||||
"system_version": "",
|
||||
"cell_heating": false,
|
||||
"expansion_pack_count": 0,
|
||||
"pv_power_total": 0,
|
||||
"pv_power_channel_1": 2000,
|
||||
"pv_power_channel_2": 0,
|
||||
"current_soc": 43,
|
||||
"charge_discharge": "discharging",
|
||||
"battery_power": -2000,
|
||||
"grid_power": 0,
|
||||
"inverter_output_power": 2000,
|
||||
"main_soc": 0,
|
||||
"expansion_pack1_soc": 0,
|
||||
"expansion_pack2_soc": 0,
|
||||
"expansion_pack3_soc": 0,
|
||||
"expansion_pack4_soc": 0,
|
||||
"expansion_pack5_soc": 0,
|
||||
"pv_power_channel_3": 0,
|
||||
"pv_power_channel_4": 0,
|
||||
"offgrid1_export_power": 0,
|
||||
"cumulative_energy_generated_pv": 18565,
|
||||
"cumulative_energy_output_inv": 13460,
|
||||
"cumulative_energy_discharged": 8183,
|
||||
"cumulative_energy_charged": 13288,
|
||||
"cumulative_energy_charged_pv": 13288,
|
||||
"cumulative_energy_charged_grid": 0,
|
||||
"cuml_e_export_offgrid1": 0,
|
||||
"backup_reserve": 59,
|
||||
"work_mode": "self_powered",
|
||||
"function_set": "",
|
||||
"output_power_limit": 2,
|
||||
"feedin_power_limit": 0,
|
||||
"feedin_power_limit_enable": false,
|
||||
"country_code": "",
|
||||
"indicator_light_mode": "eco",
|
||||
"smart_meter_type": "none",
|
||||
"recalibrate_battery": false,
|
||||
"offgrid1_export_enable": false,
|
||||
"peak_shaving_enable": false,
|
||||
"peak_shaving_threshold": 0,
|
||||
"vibe_light_scene": "",
|
||||
"user_schedule": "",
|
||||
"offgrid1_mode": "backup",
|
||||
"timestamp": "",
|
||||
"remote_pair": false,
|
||||
"inverter_status": "AQELAgADDAED",
|
||||
"command_receive": "",
|
||||
"command_send": ""
|
||||
},
|
||||
"set_up": true,
|
||||
"support_local": true
|
||||
}
|
|
@ -2665,6 +2665,37 @@
|
|||
'via_device_id': None,
|
||||
})
|
||||
# ---
|
||||
# name: test_device_registry[gbq8kiahk57ct0bpncjynx]
|
||||
DeviceRegistryEntrySnapshot({
|
||||
'area_id': None,
|
||||
'config_entries': <ANY>,
|
||||
'config_entries_subentries': <ANY>,
|
||||
'configuration_url': None,
|
||||
'connections': set({
|
||||
}),
|
||||
'disabled_by': None,
|
||||
'entry_type': None,
|
||||
'hw_version': None,
|
||||
'id': <ANY>,
|
||||
'identifiers': set({
|
||||
tuple(
|
||||
'tuya',
|
||||
'gbq8kiahk57ct0bpncjynx',
|
||||
),
|
||||
}),
|
||||
'labels': set({
|
||||
}),
|
||||
'manufacturer': 'Tuya',
|
||||
'model': 'CBE Pro',
|
||||
'model_id': 'pb0tc75khaik8qbg',
|
||||
'name': 'CBE Pro 2',
|
||||
'name_by_user': None,
|
||||
'primary_config_entry': <ANY>,
|
||||
'serial_number': None,
|
||||
'sw_version': None,
|
||||
'via_device_id': None,
|
||||
})
|
||||
# ---
|
||||
# name: test_device_registry[ggimpv4dqzkfs]
|
||||
DeviceRegistryEntrySnapshot({
|
||||
'area_id': None,
|
||||
|
|
|
@ -174,6 +174,123 @@
|
|||
'state': '1.0',
|
||||
})
|
||||
# ---
|
||||
# name: test_platform_setup_and_discovery[number.cbe_pro_2_battery_backup_reserve-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
'area_id': None,
|
||||
'capabilities': dict({
|
||||
'max': 100.0,
|
||||
'min': 0.0,
|
||||
'mode': <NumberMode.AUTO: 'auto'>,
|
||||
'step': 1.0,
|
||||
}),
|
||||
'config_entry_id': <ANY>,
|
||||
'config_subentry_id': <ANY>,
|
||||
'device_class': None,
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'number',
|
||||
'entity_category': <EntityCategory.CONFIG: 'config'>,
|
||||
'entity_id': 'number.cbe_pro_2_battery_backup_reserve',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
'icon': None,
|
||||
'id': <ANY>,
|
||||
'labels': set({
|
||||
}),
|
||||
'name': None,
|
||||
'options': dict({
|
||||
}),
|
||||
'original_device_class': None,
|
||||
'original_icon': None,
|
||||
'original_name': 'Battery backup reserve',
|
||||
'platform': 'tuya',
|
||||
'previous_unique_id': None,
|
||||
'suggested_object_id': None,
|
||||
'supported_features': 0,
|
||||
'translation_key': 'battery_backup_reserve',
|
||||
'unique_id': 'tuya.gbq8kiahk57ct0bpncjynxbackup_reserve',
|
||||
'unit_of_measurement': '%',
|
||||
})
|
||||
# ---
|
||||
# name: test_platform_setup_and_discovery[number.cbe_pro_2_battery_backup_reserve-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'friendly_name': 'CBE Pro 2 Battery backup reserve',
|
||||
'max': 100.0,
|
||||
'min': 0.0,
|
||||
'mode': <NumberMode.AUTO: 'auto'>,
|
||||
'step': 1.0,
|
||||
'unit_of_measurement': '%',
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'number.cbe_pro_2_battery_backup_reserve',
|
||||
'last_changed': <ANY>,
|
||||
'last_reported': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
'state': '59.0',
|
||||
})
|
||||
# ---
|
||||
# name: test_platform_setup_and_discovery[number.cbe_pro_2_inverter_output_power_limit-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
'area_id': None,
|
||||
'capabilities': dict({
|
||||
'max': 100000.0,
|
||||
'min': 0.0,
|
||||
'mode': <NumberMode.AUTO: 'auto'>,
|
||||
'step': 1.0,
|
||||
}),
|
||||
'config_entry_id': <ANY>,
|
||||
'config_subentry_id': <ANY>,
|
||||
'device_class': None,
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'number',
|
||||
'entity_category': <EntityCategory.CONFIG: 'config'>,
|
||||
'entity_id': 'number.cbe_pro_2_inverter_output_power_limit',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
'icon': None,
|
||||
'id': <ANY>,
|
||||
'labels': set({
|
||||
}),
|
||||
'name': None,
|
||||
'options': dict({
|
||||
}),
|
||||
'original_device_class': <NumberDeviceClass.POWER: 'power'>,
|
||||
'original_icon': None,
|
||||
'original_name': 'Inverter output power limit',
|
||||
'platform': 'tuya',
|
||||
'previous_unique_id': None,
|
||||
'suggested_object_id': None,
|
||||
'supported_features': 0,
|
||||
'translation_key': 'inverter_output_power_limit',
|
||||
'unique_id': 'tuya.gbq8kiahk57ct0bpncjynxoutput_power_limit',
|
||||
'unit_of_measurement': 'W',
|
||||
})
|
||||
# ---
|
||||
# name: test_platform_setup_and_discovery[number.cbe_pro_2_inverter_output_power_limit-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'device_class': 'power',
|
||||
'friendly_name': 'CBE Pro 2 Inverter output power limit',
|
||||
'max': 100000.0,
|
||||
'min': 0.0,
|
||||
'mode': <NumberMode.AUTO: 'auto'>,
|
||||
'step': 1.0,
|
||||
'unit_of_measurement': 'W',
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'number.cbe_pro_2_inverter_output_power_limit',
|
||||
'last_changed': <ANY>,
|
||||
'last_reported': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
'state': '2.0',
|
||||
})
|
||||
# ---
|
||||
# name: test_platform_setup_and_discovery[number.cleverio_pf100_feed-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
|
|
|
@ -1702,6 +1702,63 @@
|
|||
'state': 'unknown',
|
||||
})
|
||||
# ---
|
||||
# name: test_platform_setup_and_discovery[select.cbe_pro_2_inverter_work_mode-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
'area_id': None,
|
||||
'capabilities': dict({
|
||||
'options': list([
|
||||
'self_powered',
|
||||
'time_of_use',
|
||||
]),
|
||||
}),
|
||||
'config_entry_id': <ANY>,
|
||||
'config_subentry_id': <ANY>,
|
||||
'device_class': None,
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'select',
|
||||
'entity_category': <EntityCategory.CONFIG: 'config'>,
|
||||
'entity_id': 'select.cbe_pro_2_inverter_work_mode',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
'icon': None,
|
||||
'id': <ANY>,
|
||||
'labels': set({
|
||||
}),
|
||||
'name': None,
|
||||
'options': dict({
|
||||
}),
|
||||
'original_device_class': None,
|
||||
'original_icon': None,
|
||||
'original_name': 'Inverter work mode',
|
||||
'platform': 'tuya',
|
||||
'previous_unique_id': None,
|
||||
'suggested_object_id': None,
|
||||
'supported_features': 0,
|
||||
'translation_key': 'inverter_work_mode',
|
||||
'unique_id': 'tuya.gbq8kiahk57ct0bpncjynxwork_mode',
|
||||
'unit_of_measurement': None,
|
||||
})
|
||||
# ---
|
||||
# name: test_platform_setup_and_discovery[select.cbe_pro_2_inverter_work_mode-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'friendly_name': 'CBE Pro 2 Inverter work mode',
|
||||
'options': list([
|
||||
'self_powered',
|
||||
'time_of_use',
|
||||
]),
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'select.cbe_pro_2_inverter_work_mode',
|
||||
'last_changed': <ANY>,
|
||||
'last_reported': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
'state': 'self_powered',
|
||||
})
|
||||
# ---
|
||||
# name: test_platform_setup_and_discovery[select.ceiling_fan_with_light_countdown-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
|
|
|
@ -2369,6 +2369,54 @@
|
|||
'state': 'off',
|
||||
})
|
||||
# ---
|
||||
# name: test_platform_setup_and_discovery[switch.cbe_pro_2_output_power_limit-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
'area_id': None,
|
||||
'capabilities': None,
|
||||
'config_entry_id': <ANY>,
|
||||
'config_subentry_id': <ANY>,
|
||||
'device_class': None,
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'switch',
|
||||
'entity_category': <EntityCategory.CONFIG: 'config'>,
|
||||
'entity_id': 'switch.cbe_pro_2_output_power_limit',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
'icon': None,
|
||||
'id': <ANY>,
|
||||
'labels': set({
|
||||
}),
|
||||
'name': None,
|
||||
'options': dict({
|
||||
}),
|
||||
'original_device_class': None,
|
||||
'original_icon': None,
|
||||
'original_name': 'Output power limit',
|
||||
'platform': 'tuya',
|
||||
'previous_unique_id': None,
|
||||
'suggested_object_id': None,
|
||||
'supported_features': 0,
|
||||
'translation_key': 'output_power_limit',
|
||||
'unique_id': 'tuya.gbq8kiahk57ct0bpncjynxfeedin_power_limit_enable',
|
||||
'unit_of_measurement': None,
|
||||
})
|
||||
# ---
|
||||
# name: test_platform_setup_and_discovery[switch.cbe_pro_2_output_power_limit-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'friendly_name': 'CBE Pro 2 Output power limit',
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'switch.cbe_pro_2_output_power_limit',
|
||||
'last_changed': <ANY>,
|
||||
'last_reported': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
'state': 'off',
|
||||
})
|
||||
# ---
|
||||
# name: test_platform_setup_and_discovery[switch.ceiling_fan_light_v2_sound-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
|
|
Loading…
Reference in New Issue