From 93768c5f89939ccaf0fc2ab32039cc1117d1ed73 Mon Sep 17 00:00:00 2001 From: Przemek Grondek Date: Thu, 4 May 2023 22:51:41 +0200 Subject: [PATCH] Switch waste collection to separate module --- configuration/configuration.yaml | 70 +++----------------------------- 1 file changed, 6 insertions(+), 64 deletions(-) diff --git a/configuration/configuration.yaml b/configuration/configuration.yaml index f0233be..14ef31a 100644 --- a/configuration/configuration.yaml +++ b/configuration/configuration.yaml @@ -266,71 +266,13 @@ rest_command: "command": "connect" } -rest: - - scan_interval: 43200 # 12h - resource: 'https://warszawa19115.pl/harmonogramy-wywozu-odpadow?p_p_id=portalCKMjunkschedules_WAR_portalCKMjunkschedulesportlet_INSTANCE_o5AIb2mimbRJ&p_p_lifecycle=2&p_p_state=normal&p_p_mode=view&p_p_resource_id=ajaxResourceURL&p_p_cacheability=cacheLevelPage&p_p_col_id=column-1&p_p_col_count=1' - method: POST - payload: '_portalCKMjunkschedules_WAR_portalCKMjunkschedulesportlet_INSTANCE_o5AIb2mimbRJ_addressPointId=76748040' - headers: - Content-Type: 'application/x-www-form-urlencoded' - sensor: - - name: "Address" - value_template: "{{ value_json[0].adres }}" - - name: "Garbage Collection BIO" - device_class: 'timestamp' - value_template: "{{ value_json[0].harmonogramy[1].data }}" - json_attributes_path: "$.[0].harmonogramy.[1].frakcja" - json_attributes: - - id_frakcja - - kod - - nazwa - - opis - - name: "Garbage Collection Metal & Plastics" - device_class: 'timestamp' - value_template: "{{ value_json[0].harmonogramy[2].data }}" - json_attributes_path: "$.[0].harmonogramy.[2].frakcja" - json_attributes: - - id_frakcja - - kod - - nazwa - - opis - - name: "Garbage Collection Paper" - device_class: 'timestamp' - value_template: "{{ value_json[0].harmonogramy[3].data }}" - json_attributes_path: "$.[0].harmonogramy.[3].frakcja" - json_attributes: - - id_frakcja - - kod - - nazwa - - opis - - name: "Garbage Collection Glass" - device_class: 'timestamp' - value_template: "{{ value_json[0].harmonogramy[4].data }}" - json_attributes_path: "$.[0].harmonogramy.[4].frakcja" - json_attributes: - - id_frakcja - - kod - - nazwa - - opis - - name: "Garbage Collection Furniture" - device_class: 'timestamp' - value_template: "{{ value_json[0].harmonogramy[6].data }}" - json_attributes_path: "$.[0].harmonogramy.[6].frakcja" - json_attributes: - - id_frakcja - - kod - - nazwa - - opis - - name: "Garbage Collection Mixed" - device_class: 'timestamp' - value_template: "{{ value_json[0].harmonogramy[7].data }}" - json_attributes_path: "$.[0].harmonogramy.[7].frakcja" - json_attributes: - - id_frakcja - - kod - - nazwa - - opis +waste_collection_schedule: + sources: + - name: warszawa19115_pl + args: + geolocation_id: 76748040 +rest: calendar: - platform: caldav url: https://cloud.grondek.pl/remote.php/dav