update
This commit is contained in:
@@ -3,7 +3,6 @@ import argparse
|
||||
from util import DeviceInfo, add_to_group, name_to_id
|
||||
from ruamel.yaml import YAML
|
||||
import knx_conf as knx
|
||||
from ir_automations import create_rules as create_automation_rules
|
||||
|
||||
script_path = os.path.dirname(os.path.realpath(__file__))
|
||||
yaml = YAML()
|
||||
@@ -13,8 +12,8 @@ yaml.preserve_quotes = True
|
||||
sensor_exclude_list = [
|
||||
'sensor.fritz_box_7490_bytes_received',
|
||||
'sensor.fritz_box_7490_bytes_sent',
|
||||
#'sensor.fritz_box_7490_kbyte_sec_received',
|
||||
#'sensor.fritz_box_7490_kbyte_sec_sent',
|
||||
# 'sensor.fritz_box_7490_kbyte_sec_received',
|
||||
# 'sensor.fritz_box_7490_kbyte_sec_sent',
|
||||
'sensor.fritz_box_7490_packets_received',
|
||||
'sensor.fritz_box_7490_packets_sec_received',
|
||||
'sensor.fritz_box_7490_packets_sec_sent',
|
||||
@@ -162,8 +161,7 @@ def add_knx_devices(devices, groups):
|
||||
for device_type, devices in [('light', lights), ('cover', shutters), ('switch', switches)]:
|
||||
for device in devices:
|
||||
add_to_group(groups, device.groups, device.display_name, device_type)
|
||||
return template_sensors
|
||||
|
||||
return template_sensors
|
||||
|
||||
|
||||
def add_meta_groups(groups):
|
||||
@@ -256,14 +254,13 @@ def create_config(target_directory, development=False):
|
||||
manual_config_dict = yaml.load(open(manual_config_path, encoding="utf-8"))
|
||||
|
||||
knx_conf = {
|
||||
'rate_limit': 20,
|
||||
'tunneling': {
|
||||
'host': '192.168.178.65',
|
||||
'port': 3671
|
||||
}
|
||||
#'tunneling': {
|
||||
# 'host': '192.168.178.65',
|
||||
# 'port': 3671
|
||||
#}
|
||||
}
|
||||
template_sensors = add_knx_devices(knx_conf, group_dict)
|
||||
|
||||
|
||||
all_devices = {}
|
||||
all_devices.update(template_sensors)
|
||||
|
||||
@@ -298,8 +295,6 @@ def create_config(target_directory, development=False):
|
||||
additional_file = 'secrets_development.yaml' if development else 'secrets_deploy.yaml'
|
||||
output.write(open(os.path.join(script_path, additional_file), 'r').read())
|
||||
|
||||
#create_automation_rules(os.path.join(target_directory, 'automations'))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
parser = argparse.ArgumentParser()
|
||||
|
||||
Reference in New Issue
Block a user