mirror of
https://github.com/Dielee/volvo2mqtt.git
synced 2026-08-12 10:49:52 +02:00
Add climate scheduler option
This commit is contained in:
@@ -111,6 +111,7 @@ def get_vehicles():
|
||||
raise Exception("No vehicle found, exiting application!")
|
||||
else:
|
||||
initialize_climate(vins)
|
||||
initialize_scheduler(vins)
|
||||
logging.info("Vin: " + str(vins) + " found!")
|
||||
|
||||
|
||||
@@ -168,6 +169,12 @@ def check_supported_endpoints():
|
||||
logging.info("Failed, " + entity["name"] + " is unfortunately not supported by your vehicle.")
|
||||
|
||||
|
||||
def initialize_scheduler(vins):
|
||||
for vin in vins:
|
||||
mqtt.active_schedules[vin] = {"timers": []}
|
||||
mqtt.subscribed_topics = [f"homeassistant/schedule/{vin}/command"]
|
||||
|
||||
|
||||
def initialize_climate(vins):
|
||||
for vin in vins:
|
||||
mqtt.assumed_climate_state[vin] = "OFF"
|
||||
|
||||
Reference in New Issue
Block a user