Skip to content

Commit

Permalink
Use snapshots for ConfigEntry migration tests (#136093)
Browse files Browse the repository at this point in the history
* Add snapshots for migration

* Reduce fixtures specific to migration

* Explicitly test versions of migrated entries
  • Loading branch information
alengwenus authored Feb 7, 2025
1 parent bdc847c commit d9726ab
Show file tree
Hide file tree
Showing 4 changed files with 148 additions and 404 deletions.
217 changes: 0 additions & 217 deletions tests/components/lcn/fixtures/config_entry_pchk_v1_1.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,6 @@
"hardware_serial": -1,
"software_serial": -1,
"hardware_type": -1
},
{
"address": [0, 5, true],
"name": "TestGroup",
"hardware_serial": -1,
"software_serial": -1,
"hardware_type": -1
}
],
"entities": [
Expand All @@ -33,216 +26,6 @@
"dimmable": true,
"transition": 5000.0
}
},
{
"address": [0, 7, false],
"name": "Light_Output2",
"resource": "output2",
"domain": "light",
"domain_data": {
"output": "OUTPUT2",
"dimmable": false,
"transition": 0
}
},
{
"address": [0, 7, false],
"name": "Light_Relay1",
"resource": "relay1",
"domain": "light",
"domain_data": {
"output": "RELAY1",
"dimmable": false,
"transition": 0.0
}
},
{
"address": [0, 7, false],
"name": "Switch_Output1",
"resource": "output1",
"domain": "switch",
"domain_data": {
"output": "OUTPUT1"
}
},
{
"address": [0, 7, false],
"name": "Switch_Output2",
"resource": "output2",
"domain": "switch",
"domain_data": {
"output": "OUTPUT2"
}
},
{
"address": [0, 7, false],
"name": "Switch_Relay1",
"resource": "relay1",
"domain": "switch",
"domain_data": {
"output": "RELAY1"
}
},
{
"address": [0, 7, false],
"name": "Switch_Relay2",
"resource": "relay2",
"domain": "switch",
"domain_data": {
"output": "RELAY2"
}
},
{
"address": [0, 7, false],
"name": "Switch_Regulator1",
"resource": "r1varsetpoint",
"domain": "switch",
"domain_data": {
"output": "R1VARSETPOINT"
}
},
{
"address": [0, 7, false],
"name": "Switch_KeyLock1",
"resource": "a1",
"domain": "switch",
"domain_data": {
"output": "A1"
}
},
{
"address": [0, 5, true],
"name": "Switch_Group5",
"resource": "relay1",
"domain": "switch",
"domain_data": {
"output": "RELAY1"
}
},
{
"address": [0, 7, false],
"name": "Cover_Outputs",
"resource": "outputs",
"domain": "cover",
"domain_data": {
"motor": "OUTPUTS",
"reverse_time": "RT1200"
}
},
{
"address": [0, 7, false],
"name": "Cover_Relays",
"resource": "motor1",
"domain": "cover",
"domain_data": {
"motor": "MOTOR1",
"reverse_time": "RT1200"
}
},
{
"address": [0, 7, false],
"name": "Climate1",
"resource": "var1.r1varsetpoint",
"domain": "climate",
"domain_data": {
"source": "VAR1",
"setpoint": "R1VARSETPOINT",
"lockable": true,
"min_temp": 0.0,
"max_temp": 40.0,
"unit_of_measurement": "°C"
}
},
{
"address": [0, 7, false],
"name": "Romantic",
"resource": "0.0",
"domain": "scene",
"domain_data": {
"register": 0,
"scene": 0,
"outputs": ["OUTPUT1", "OUTPUT2", "RELAY1"],
"transition": null
}
},
{
"address": [0, 7, false],
"name": "Romantic Transition",
"resource": "0.1",
"domain": "scene",
"domain_data": {
"register": 0,
"scene": 1,
"outputs": ["OUTPUT1", "OUTPUT2", "RELAY1"],
"transition": 10000
}
},
{
"address": [0, 7, false],
"name": "Sensor_LockRegulator1",
"resource": "r1varsetpoint",
"domain": "binary_sensor",
"domain_data": {
"source": "R1VARSETPOINT"
}
},
{
"address": [0, 7, false],
"name": "Binary_Sensor1",
"resource": "binsensor1",
"domain": "binary_sensor",
"domain_data": {
"source": "BINSENSOR1"
}
},
{
"address": [0, 7, false],
"name": "Sensor_KeyLock",
"resource": "a5",
"domain": "binary_sensor",
"domain_data": {
"source": "A5"
}
},
{
"address": [0, 7, false],
"name": "Sensor_Var1",
"resource": "var1",
"domain": "sensor",
"domain_data": {
"source": "VAR1",
"unit_of_measurement": "°C"
}
},
{
"address": [0, 7, false],
"name": "Sensor_Setpoint1",
"resource": "r1varsetpoint",
"domain": "sensor",
"domain_data": {
"source": "R1VARSETPOINT",
"unit_of_measurement": "°C"
}
},
{
"address": [0, 7, false],
"name": "Sensor_Led6",
"resource": "led6",
"domain": "sensor",
"domain_data": {
"source": "LED6",
"unit_of_measurement": "NATIVE"
}
},
{
"address": [0, 7, false],
"name": "Sensor_LogicOp1",
"resource": "logicop1",
"domain": "sensor",
"domain_data": {
"source": "LOGICOP1",
"unit_of_measurement": "NATIVE"
}
}
]
}
Loading

0 comments on commit d9726ab

Please sign in to comment.