In the future, please post code as formatted text and not as a screenshot (see guideline #14 in the FAQ).
You can create a Counter for each entity then enhance your automation so it also increments the entity’s counter.
For example, assuming you create these counters:
counter.printer_keuken_zaak_color
counter.printer_keuken_zaak_black
counter.printer_bureau_black
counter.printer_bureau_color
You can then add the following service call to your automation’s action.
- service: counter.increment
target:
entity_id: "counter.{{trigger.to_state.object_id}}"
If sensor.printer_bureau_color
triggers the automation, then counter.printer_bureau_color
will be incremented.