Condition_template excluding events from triggering the error counter

hi,

Id like to exclude several frequently occurring issues from adding to the counter and notification creator:

  - alias: Count errors
    id: '1511601478029'
    initial_state: 'on'
    trigger:
      platform: event
      event_type: system_log_event
      event_data:
        level: ERROR
    action:
      service: counter.increment
      entity_id: counter.error_counter


  - alias: Create notifications for "service" errors
    id: '1511601478030'
    trigger:
      platform: event
      event_type: system_log_event
    condition:
      condition: template
      value_template: '{{ "service" in trigger.event.data.message }}'
    action:
      service: persistent_notification.create
      data_template:
        title: Something bad happened
        message: '{{ trigger.event.data.message }}'

how would i need to change the condition_template to exclude errors on

[frontend.js.latest.201803100] :0:0 Script error.
and
googlemaps.exceptions

47
obviously I need to add a condition_template to the error counter, would below syntax be correct?:

condition:
  condition: template
  value_template: '{{ " :0 :0 script error" not in trigger.event.data.message  and  " googlemaps.exceptions" not in trigger.event.data.message }}' ?

the reason I ask is tonight the adapter of one of my switches died, causing several hubs to go offline, and HomeAssistant not liking that:

36

over 700 persistent notifications where created…

which makes me have an extra question: how to prevent persistent.notifications to be created for the same error. Would that be possible?

Please have a look with me,

Marius