4 replies

Hi. What exactly is outdated? Can you specify? Thanks in advance!

Z

the most recent changes are to trigger: and platform:
but also not long ago, action: and service: and condition: were changed too

https://www.home-assistant.io/blog/2024/08/07/release-20248/#goodbye-service-calls-hello-actions-

https://www.home-assistant.io/blog/2024/10/02/release-202410/#improved-yaml-syntax-for-automations

essentially, i think maybe

trigger: replace with triggers:
platform:
replace with trigger:
action:
replace with actions:
service:
replace with action:
condition: replace with conditions:

while your the code still functions, it no longer follows the current syntax and now my configuration.yaml is now always in a state of error when open in vscode

Note that your blueprint code is also outdated as a result of these changes

once again, it technically still functions, but it's very confusing when looking at home assistant documentation, and comparing to your older code as it no longer aligns

hope that helps

Thanks! Does it work if you do the replacements you mention? :)

Z

sadly, doing the basic substitution does not work for me,
which is why i have contacted you in the hope you would update the tasker integration documentation, with your developer abilities!

Z

Hello
Here is the working solution for the legacy syntax error in home assistant
(note the first trigger is not replaced by triggers)

template:
  - trigger:
      trigger: event
      event_type: tasker_event
    sensor:
      - name: Tasker State
        state: "{{trigger.event.data.state}}"

maybe you can now update your home assistant integration documentation to reflect the current syntax?

Hi. Thank you very much! So, just change "platform" to "trigger"?

Z

yes, that was the only change needed for the template section to work without errors. 
note the singular "trigger" for platform, not "triggers" like for top-level trigger keys

  • The top-level trigger key is now triggers (plural)
  • The top-level condition key is now conditions (plural)
  • The top-level action key is now actions (plural)
  • The platform key of a trigger definition is now trigger

BTW Your blueprint will also need changing.
this seems to work for me:

blueprint:
  name: Tasker HTTP Request V2
  description: Call Tasker when a device changes state (Revised)
  domain: automation
  input:
    ip_address:
      name: IP Address
      description: The IP Address of the Android device Tasker is running on
      default: "192.168."
      selector:
        text:
    port:
      name: Port
      description: The port the Tasker device is listening on (usually 1821)
      default: 1821
      selector:
        number:
          min: 1
          max: 65535
          mode: box

    path:
      name: Path
      description: The path in the HTTP Request event condition that the Tasker device is listening on (usually 'home_assistant')
      default: "home_assistant"
      selector:
        text:
    target_devices:
      name: Devices
      description: The devices that should trigger the request
      selector:
        entity:
          multiple: true

trigger:
  - trigger: state
    entity_id: !input target_devices

action:
  - action: rest_command.tasker
    data:
      ip_address: !input ip_address
      port: !input port
      path: !input path
      event: >
        {
          "device_id": "{{ trigger.entity_id }}",
          "device_name": "{{ state_attr(trigger.entity_id, 'friendly_name') }}",
          "from": "{{ trigger.from_state.state }}",
          "to": "{{ trigger.to_state.state }}"
        }

Thank you!! I've updated it now! Can you please check if it's ok? Thanks again!

Z

Hi, i've checked for you and there's a problem with your yaml indentation

not sure why this forum double spaces code blocks, but here's a pastebin of the correctly formatted yaml. hope that helps:

https://pastebin.com/EJ7WWcF8

Oops 😅 Sorry about that! Fixed now! thanks again!

Topic is closed for comments