Code by Scott שאול בן ישוע
Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Sha'ul ben Yeshua
powerwall2
Commits
79db8e62
Verified
Commit
79db8e62
authored
May 04, 2020
by
Sha'ul ben Yeshua
🎗
Browse files
driver code changes
parent
fcc21ca3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Hubitat/driver/TeslaPowerwall2.groovy
View file @
79db8e62
...
...
@@ -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
)
{
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment