diff --git a/tests/components/tuya/fixtures/qccdz_dsmsam7xpb3ht7rl.json b/tests/components/tuya/fixtures/qccdz_dsmsam7xpb3ht7rl.json new file mode 100644 index 000000000000..effa1abeffdb --- /dev/null +++ b/tests/components/tuya/fixtures/qccdz_dsmsam7xpb3ht7rl.json @@ -0,0 +1,157 @@ +{ + "endpoint": "https://apigw.tuyaeu.com", + "mqtt_connected": true, + "disabled_by": null, + "disabled_polling": false, + "name": "EV Charger", + "category": "qccdz", + "product_id": "dsmsam7xpb3ht7rl", + "product_name": "EV Charger", + "online": true, + "sub": false, + "time_zone": "+03:00", + "active_time": "2026-09-04T09:07:25+00:00", + "create_time": "2026-09-04T09:07:25+00:00", + "update_time": "2026-09-04T09:07:25+00:00", + "function": { + "charge_cur_set": { + "type": "Integer", + "value": { + "unit": "A", + "min": 1, + "max": 255, + "scale": 0, + "step": 1 + } + }, + "work_mode": { + "type": "Enum", + "value": { + "range": [ + "charge_now", + "charge_pct", + "charge_energy", + "charge_schedule" + ] + } + }, + "switch": { + "type": "Boolean", + "value": {} + } + }, + "status_range": { + "forward_energy_total": { + "type": "Integer", + "value": { + "unit": "kW·h", + "min": 0, + "max": 99999999, + "scale": 2, + "step": 1 + }, + "report_type": "minux" + }, + "work_state": { + "type": "Enum", + "value": { + "range": [ + "charger_free", + "charger_insert", + "charger_free_fault", + "charger_wait", + "charger_charging", + "charger_pause", + "charger_end", + "charger_fault" + ] + }, + "report_type": null + }, + "charge_cur_set": { + "type": "Integer", + "value": { + "unit": "A", + "min": 1, + "max": 255, + "scale": 0, + "step": 1 + }, + "report_type": null + }, + "sigle_phase_power": { + "type": "Integer", + "value": { + "unit": "kW", + "min": 0, + "max": 99999999, + "scale": 3, + "step": 1 + }, + "report_type": null + }, + "power_total": { + "type": "Integer", + "value": { + "unit": "kW", + "min": 0, + "max": 99999999, + "scale": 3, + "step": 1 + }, + "report_type": null + }, + "work_mode": { + "type": "Enum", + "value": { + "range": [ + "charge_now", + "charge_pct", + "charge_energy", + "charge_schedule" + ] + }, + "report_type": null + }, + "switch": { + "type": "Boolean", + "value": {}, + "report_type": null + }, + "temp_current": { + "type": "Integer", + "value": { + "unit": "℃", + "min": -40, + "max": 200, + "scale": 0, + "step": 1 + }, + "report_type": null + }, + "charge_energy_once": { + "type": "Integer", + "value": { + "unit": "kW·h", + "min": 0, + "max": 999999, + "scale": 2, + "step": 1 + }, + "report_type": null + } + }, + "status": { + "forward_energy_total": 20, + "work_state": "charger_free", + "charge_cur_set": 10, + "sigle_phase_power": 0, + "power_total": 0, + "work_mode": "charge_now", + "switch": false, + "temp_current": 24, + "charge_energy_once": 0 + }, + "set_up": true, + "support_local": true +} diff --git a/tests/components/tuya/snapshots/test_init.ambr b/tests/components/tuya/snapshots/test_init.ambr index ca8af6a978a1..a4d2cea87e8e 100644 --- a/tests/components/tuya/snapshots/test_init.ambr +++ b/tests/components/tuya/snapshots/test_init.ambr @@ -5639,6 +5639,36 @@ 'via_device_id': None, }) # --- +# name: test_device_registry[lr7th3bpx7masmsdzdccq] + DeviceRegistryEntrySnapshot({ + 'area_id': None, + 'config_entry_id': , + 'config_subentry_id': , + 'configuration_url': None, + 'connections': set({ + }), + 'disabled_by': None, + 'entry_type': None, + 'hw_version': None, + 'id': , + 'identifiers': set({ + tuple( + 'tuya', + 'lr7th3bpx7masmsdzdccq', + ), + }), + 'labels': set({ + }), + 'manufacturer': 'Tuya', + 'model': 'EV Charger', + 'model_id': 'dsmsam7xpb3ht7rl', + 'name': 'EV Charger', + 'name_by_user': None, + 'serial_number': None, + 'sw_version': None, + 'via_device_id': None, + }) +# --- # name: test_device_registry[m2gpwqz5xb4chzqubdnz] DeviceRegistryEntrySnapshot({ 'area_id': None, diff --git a/tests/components/tuya/snapshots/test_switch.ambr b/tests/components/tuya/snapshots/test_switch.ambr index c34d82e1886e..a9b7dec7b72e 100644 --- a/tests/components/tuya/snapshots/test_switch.ambr +++ b/tests/components/tuya/snapshots/test_switch.ambr @@ -4235,6 +4235,56 @@ 'state': 'off', }) # --- +# name: test_platform_setup_and_discovery[switch.ev_charger_switch-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'switch', + 'entity_category': None, + 'entity_id': 'switch.ev_charger_switch', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Switch', + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Switch', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'switch', + 'unique_id': 'tuya.lr7th3bpx7masmsdzdccqswitch', + 'unit_of_measurement': None, + }) +# --- +# name: test_platform_setup_and_discovery[switch.ev_charger_switch-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'EV Charger Switch', + }), + 'context': , + 'entity_id': 'switch.ev_charger_switch', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- # name: test_platform_setup_and_discovery[switch.fakkel_veranda_socket_1-entry] EntityRegistryEntrySnapshot({ 'aliases': list([