Thank you so much, this is awesome!
May I ask, if the sensors can get the appropriate measurement classes and device classes to get statistics created according to this: GitHub - partach/protocol_wizard: The Protocol Wizard helps you build your home assistant devices without need for any yaml!
Also, I created (haha, I adapted, YOU created
) a template ‘mid’ for the SDM630 - it is basic plus frequency:
[
{
"name": "Phase 1 Voltage",
"address": 0,
"data_type": "float32",
"register_type": "input",
"rw": "read",
"unit": "V",
"scale": 1.0,
"offset": 0.0,
"byte_order": "big",
"word_order": "big",
"allow_bits": false
},
{
"name": "Phase 2 Voltage",
"address": 2,
"data_type": "float32",
"register_type": "input",
"rw": "read",
"unit": "V",
"scale": 1.0,
"offset": 0.0,
"byte_order": "big",
"word_order": "big",
"allow_bits": false
},
{
"name": "Phase 3 Voltage",
"address": 4,
"data_type": "float32",
"register_type": "input",
"rw": "read",
"unit": "V",
"scale": 1.0,
"offset": 0.0,
"byte_order": "big",
"word_order": "big",
"allow_bits": false
},
{
"name": "Phase 1 Current",
"address": 6,
"data_type": "float32",
"register_type": "input",
"rw": "read",
"unit": "A",
"scale": 1.0,
"offset": 0.0,
"byte_order": "big",
"word_order": "big",
"allow_bits": false
},
{
"name": "Phase 2 Current",
"address": 8,
"data_type": "float32",
"register_type": "input",
"rw": "read",
"unit": "A",
"scale": 1.0,
"offset": 0.0,
"byte_order": "big",
"word_order": "big",
"allow_bits": false
},
{
"name": "Phase 3 Current",
"address": 10,
"data_type": "float32",
"register_type": "input",
"rw": "read",
"unit": "A",
"scale": 1.0,
"offset": 0.0,
"byte_order": "big",
"word_order": "big",
"allow_bits": false
},
{
"name": "Phase 1 Power",
"address": 12,
"data_type": "float32",
"register_type": "input",
"rw": "read",
"unit": "W",
"scale": 1.0,
"offset": 0.0,
"byte_order": "big",
"word_order": "big",
"allow_bits": false
},
{
"name": "Phase 2 Power",
"address": 14,
"data_type": "float32",
"register_type": "input",
"rw": "read",
"unit": "W",
"scale": 1.0,
"offset": 0.0,
"byte_order": "big",
"word_order": "big",
"allow_bits": false
},
{
"name": "Phase 3 Power",
"address": 16,
"data_type": "float32",
"register_type": "input",
"rw": "read",
"unit": "W",
"scale": 1.0,
"offset": 0.0,
"byte_order": "big",
"word_order": "big",
"allow_bits": false
},
{
"name": "Total Power",
"address": 52,
"data_type": "float32",
"register_type": "input",
"rw": "read",
"unit": "W",
"scale": 1.0,
"offset": 0.0,
"byte_order": "big",
"word_order": "big",
"allow_bits": false
},
{
"name": "Frequency",
"address": 70,
"data_type": "float32",
"register_type": "input",
"rw": "read",
"unit": "Hz",
"scale": 1.0,
"offset": 0.0,
"byte_order": "big",
"word_order": "big",
"allow_bits": false
},
{
"name": "Total Energy",
"address": 342,
"data_type": "float32",
"register_type": "input",
"rw": "read",
"unit": "kWh",
"scale": 1.0,
"offset": 0.0,
"byte_order": "big",
"word_order": "big",
"allow_bits": false
}
]