{
    "templates": [
        {
            "interfaceName": "extendedsmartmeterproducer",
            "description": "Charge my car while producing energy.",
            "ruleNameTemplate": "Smart car charging",
            "stateEvaluatorTemplate": {
                "stateDescriptorTemplate": {
                    "interfaceName": "extendedsmartmeterproducer",
                    "interfaceState": "currentPower",
                    "operator": "ValueOperatorGreater",
                    "value": 0,
                    "selectionId": 0
                }
            },
            "ruleActionTemplates": [
                {
                    "interfaceName": "evcharger",
                    "interfaceAction": "power",
                    "selectionId": 1,
                    "params": [
                        {
                            "name": "power",
                            "value": true
                        }
                    ]
                }
            ],
            "ruleExitActionTemplates": [
                {
                    "interfaceName": "evcharger",
                    "interfaceAction": "power",
                    "selectionId": 1,
                    "params": [
                        {
                            "name": "power",
                            "value": false
                        }
                    ]
                }
            ]
        },
        {
            "interfaceName": "extendedsmartmeterproducer",
            "description": "Turn on heating while producing energy.",
            "ruleNameTemplate": "Smart heating",
            "stateEvaluatorTemplate": {
                "stateDescriptorTemplate": {
                    "interfaceName": "extendedsmartmeterproducer",
                    "interfaceState": "currentPower",
                    "operator": "ValueOperatorGreater",
                    "value": 0,
                    "selectionId": 0
                }
            },
            "ruleActionTemplates": [
                {
                    "interfaceName": "heating",
                    "interfaceAction": "power",
                    "selectionId": 1,
                    "params": [
                        {
                            "name": "power",
                            "value": true
                        }
                    ]
                }
            ],
            "ruleExitActionTemplates": [
                {
                    "interfaceName": "heating",
                    "interfaceAction": "power",
                    "selectionId": 1,
                    "params": [
                        {
                            "name": "power",
                            "value": false
                        }
                    ]
                }
            ]
        }
    ]
}
