Code by Scott שאול בן ישוע
Verified Commit 79db8e62 authored by Sha'ul ben Yeshua's avatar Sha'ul ben Yeshua 🎗
Browse files

driver code changes

parent fcc21ca3
......@@ -16,7 +16,10 @@
*
*/
def version() { return "v1.0" }
def setVersion(){
state.DriverVersion = "1.0.0"
state.InternalName = "Powerwall II"
}
metadata {
definition (name: "Tesla Powerwall II Status", namespace: "sgrayban", author: "Scott Grayban") {
......@@ -26,6 +29,8 @@ metadata {
capability "Sensor"
capability "VoltageMeasurement"
command "configure"
attribute "energy_imported", "number"
attribute "energy_exported", "number"
attribute "powerwall", "number"
......@@ -67,10 +72,23 @@ def updated() {
def initialize() {
configure()
updateCharge()
runEvery1Minute(updateCharge)
}
def configure() {
updateDataValue ("company", "Evergen (Australia)")
updateDataValue ("customer_id", "AN-0138078")
updateDataValue ("phone", "0490138164")
updateDataValue ("email", "mark@openelec.com.au")
updateDataValue ("location", "Outdoor")
updateDataValue ("mounting", "Wall")
updateDataValue ("wiring", "Side")
setVersion()
}
// parse events into attributes
def parse(String description) {
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment