Closed Naesstrom closed 2 years ago
Yes, you can use the manual update, and set the date by an automation triggered by the garbage collection loaded event. Check the documentation, and the included blueprints
Ah yes I see, didn't dare to click the "BEWARE, more advanced yaml here" part at first but it worked just great! For future reference if someone else want's to do the same this is my automation
alias: garbage_collection update bin1
description: 'Update collection date for bin 1 from rest sensor'
trigger:
- platform: event
event_type: garbage_collection_loaded
event_data:
entity_id: sensor.bin_1
action:
- service: garbage_collection.add_date
data:
entity_id: '{{ trigger.event.data.entity_id }}'
date: '{{ states("sensor.bin_1_rest") }}'
- service: garbage_collection.update_state
data:
entity_id: sensor.bin_1
mode: single
Didn't work at first but that was just me being stupid, need to change the bins config to manual ^^ yes... like the manual says....
Before you submit a new bug report, please check that
Write your question here
I've managed to get a json source from my garbage collection company and made a date sensor for each bin from that via REST. Karl_1_2 and Karl_2_2 is the ones with the date from the rest sensor and the others is from your component. Can I somehow use the rest sensors to set the date for the component, right now I'm just using the every-n-weeks approach.