forked from evcc-io/evcc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request evcc-io#558 from andig/chore/split-openwb
Fix openWB energy and currents not exposed
- Loading branch information
Showing
5 changed files
with
92 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package charger | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/andig/evcc/api" | ||
) | ||
|
||
func TestOpenWBDecorators(t *testing.T) { | ||
// host not reachable | ||
wb, _ := NewOpenWBFromConfig(map[string]interface{}{ | ||
"broker": "192.0.2.2", | ||
}) | ||
|
||
if _, ok := wb.(api.Meter); !ok { | ||
t.Error("missing Meter api") | ||
} | ||
|
||
if _, ok := wb.(api.MeterEnergy); !ok { | ||
t.Error("missing MeterEnergy api") | ||
} | ||
|
||
if _, ok := wb.(api.MeterCurrent); !ok { | ||
t.Error("missing MeterCurrent api") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters