immersive-home/src/globals/home_adapters.gd

27 lines
503 B
GDScript3
Raw Normal View History

2023-10-30 02:21:50 +02:00
extends Node
var Adapter = preload("res://src/home_adapters/adapter.gd")
var adapter = Adapter.new(Adapter.ADAPTER_TYPES.HASS)
2023-11-03 00:13:55 +02:00
var adapter_ws = Adapter.new(Adapter.ADAPTER_TYPES.HASS_WS)
func _ready():
add_child(adapter_ws)
var timer = Timer.new()
timer.set_wait_time(1)
timer.set_one_shot(true)
print("timer started")
timer.timeout.connect(func():
print("timer done")
var result = await adapter_ws.get_state("light.living_room")
print(result)
)
add_child(timer)
timer.start()