Input_datetime.set_datetime error while checking yaml

HA version 101.0

I am sure I have some sort of format error. Just not seeing it. First I tested using the developers call service. This worked.

image

Now here is my YAML config:

- alias: change_air_filter_reminder_send
  trigger:
    - platform: state
      entity_id: sensor.change_air_filter_send_message
      to: 'on'
  action:
    # - service: notify.textalertspaul
      # data:
        # title: 'Change Air Filter'
        # message: 'The message is a reminder'
    - service: input_datetime.set_datetime
      entity_id: input_datetime.change_air_filter_send_message
      #datetime: "{{(now() + 90).strftime('%Y-%m-%d %H:%M:%S.000')}}"
      datetime: '2019-04-22 14:00:02'

The error message is:
image

Again, it must be a YAML formatting issue, I just don’t see it.

BTW, the goal is to send a text and reset the timer for another reminder until a switch is turned off. If I run the service (“YAML”) with just the text it works. So now I am trying to update the input.datetime of the next message. Once I get the literal working then I will move to the template to add time for the next reminder.

[EDIT] Answer here https://community.home-assistant.io/t/input-datetime-set-datetime-error-while-checking-yaml/147493/2?u=penright

service: input_datetime.set_datetime
data:
  entity_id: input_datetime.change_air_filter_send_message
  datetime: '2019-04-22 14:00:02'

Or with the template

service: input_datetime.set_datetime
data_template:
  entity_id: input_datetime.change_air_filter_send_message
  datetime: "{{(now() + 90).strftime('%Y-%m-%d %H:%M:%S.000')}}"

@anon43302295 Thanks. That did it. This is my first adventure into HA automation. All the ones I have done so far was in AppDaemon in python. The nuance of the syntax and how to translate from the developer tools. Live and learn. Let me restate to see if I am clear. After the service name to be called, there will be either data or data_template. Here is what confused me. I had an automation that turned on/off the reminder automation. Its entity was under service. So that is what confused me.

So both of these are equivalent.

- alias: 'change_air_filter_send_message_update'
  trigger:
    - platform: time_pattern
      minutes: '/1'
  action:
    - service: homeassistant.update_entity
      data:
         entity_id: sensor.change_air_filter_send_message
- alias: 'change_air_filter_send_message_update'
  trigger:
    - platform: time_pattern
      minutes: '/1'
  action:
    - service: homeassistant.update_entity
      entity_id: sensor.change_air_filter_send_message

One might work oneway, but the other (data/data_template) will always work. Thanks again.

Yes, but only entity_id will work outside the data/data_template key, so any other service data must be passed within.