mirror of
https://github.com/mtan93/homebridge.git
synced 2026-03-08 05:31:55 +00:00
HA switch takes a type argument
This lets you pass the domain to the switch to let it be other types of objects, like say, a scene.
This commit is contained in:
@@ -399,9 +399,9 @@ HomeAssistantMediaPlayer.prototype = {
|
||||
}
|
||||
|
||||
|
||||
function HomeAssistantSwitch(log, data, client) {
|
||||
function HomeAssistantSwitch(log, data, client, type) {
|
||||
// device info
|
||||
this.domain = "switch"
|
||||
this.domain = type || "switch"
|
||||
this.data = data
|
||||
this.entity_id = data.entity_id
|
||||
if (data.attributes && data.attributes.friendly_name) {
|
||||
|
||||
Reference in New Issue
Block a user