My first blueprint

I’ve created the blueprint below to be able to couple Loxone switches from pyLoxone to Matter switches. The blueprint works but when I save the automation it says the entity ‘switch.loxone_tv_stopcontact_tv_stopcontact’ does not exist but it does. Why is that happening?

blueprint:
  name: Loxone Matter Switch
  description: Het koppelen van een Loxone switch aan een Matter switch
  domain: automation
  input:
    loxone_entity:
      name: Loxone entity
      selector:
        entity:
          integration: loxone
          domain: switch
    matter_entity:
      name: Matter entity
      selector:
        entity:
          integration: matter
          domain: switch

triggers:
  - type: turned_on
    device_id: !input loxone_entity
    domain: switch
    trigger: device
    id: Loxone.AAN
  - type: turned_off
    device_id: !input loxone_entity
    domain: switch
    trigger: device
    id: Loxone.UIT
  - type: turned_on
    device_id: !input matter_entity
    domain: switch
    trigger: device
    id: Matter.AAN
  - type: turned_off
    device_id: !input matter_entity
    domain: switch
    trigger: device
    id: Matter.UIT

actions:
  - choose:
      - conditions:
          - condition: trigger
            id:
              - Loxone.AAN
        sequence:
          - action: switch.turn_on
            target:
              device_id: !input loxone_entity
        alias: Loxone.AAN
      - conditions:
          - condition: trigger
            id:
              - Loxone.UIT
        sequence:
          - action: switch.turn_off
            target:
              device_id: !input loxone_entity
        alias: Loxone.UIT
      - conditions:
          - condition: trigger
            id:
              - Matter.AAN
        sequence:
          - type: turn_on
            device_id: !input matter_entity
            domain: switch
        alias: Matter.AAN
      - conditions:
          - condition: trigger
            id:
              - Matter.UIT
        sequence:
          - type: turn_off
            device_id: !input matter_entity
            domain: switch
        alias: Matter.UIT
mode: single

It’s very difficult to read what you posted to see where the issue might be. Can you please format it withing a code block as per this community guide?

Just did. I’m new to this forum. Didn’t know how to format the text.

1 Like

We’re all new at some point :slightly_smiling_face:
Edit: Wait a minute, you’ve been a forum for much longer than I have :wink:

Just makes it easier to assist you. Copy and pasting the formatted code showed me an immediate error, integration: and domain: need to be nested inside a filter: key as per the entity selector docs.

      selector:
        entity:
          filter:
            integration: loxone
            domain: switch

Add it to both spots and see if that works for you.

Thank you for helping me. I added the ‘filter:’. The Blueprint does not work any different than before. It selects the integration and domain the same way as before. But the error remains. Still doesn’t recognize the entity selected.

I think I missed the obvious here, you are triggering on a device_id but switch.loxone_tv_stopcontact_tv_stopcontact is an entity_id. Either change your trigger to a state: trigger with an entity_id or change your selector to a device: selector and nest the entity: key.

This is the example device selector from the docs

device:
  filter:
    - integration: deconz
      manufacturer: Philips
      model: RWL021
  entity:
    - domain: sensor
      device_class: battery

You’re right. I’ve been a member a long time but not very active. Lately I decided to break the vendor lock Loxone has on me. They don’t support Matter at the moment and I believe it is not in their interest to do so. So, there you have it. I need to investigate other posibilities like Home Assistant. One thing I’ve learned that it is a steep learning curve to get going with HA. YAML is not a very forgiving syntax and you need to know what to enter in order for things to work. I’m very grateful for the effort the HA team has put into the product and keep it free as well.

I;ve also been on the 1Home endeavor but that has ended in the biggest financial mistake in my home. 1Home Server is not mature and after half a year still isn’t and I don’s see any movement on their part at the moment. Anyone listening in on this conversation with a Loxone system in their home don’t make the mistake to buy a 1Home Server at this time, you’ll regret it.

I’m not sure how to but I’ll try some changes. Thanks again.

See the edit/addition to my previous post, docs are here.

Well it changed the error to something else:

Value must be one of [‘changed_states’] for dictionary value @ data[‘type’].

Which sounds like abracadabra to me.

It’s 1:06 here now and I’m off to bed. Please don’t be offended when I don’t react.

It’s a global community, it’s expected.

Thanks for contributing to the community with a new Blueprint.

Since you are still de-bugging this code a bit, I changed the category to the one where we troubleshoot stuff.
Once you get the bugs worked out, feel free to post again in the blueprint exchange.
When you do, this will also help.
Many people who are not familiar with directory structures will have problems installing this without the Home Assistant MY tools.
Adding a MY link for this Blueprint to your top post would help them a lot.
Here is the link to make that.
Create a link – My Home Assistant

This blueprint works.

  name: Loxone Matter Switch
  description: Het koppelen van een Loxone switch aan een Matter switch
  domain: automation
  input:
    loxone_entity:
      name: Loxone entity
      selector:
        entity:
          domain: switch
          integration: loxone

    matter_entity:
      name: Matter entity
      selector:
        entity:
          domain: switch
          integration: matter

trigger:
  - platform: state
    entity_id: !input loxone_entity
    to: "on"
    id: Loxone.AAN

  - platform: state
    entity_id: !input loxone_entity
    to: "off"
    id: Loxone.UIT

  - platform: state
    entity_id: !input matter_entity
    to: "on"
    id: Matter.AAN

  - platform: state
    entity_id: !input matter_entity
    to: "off"
    id: Matter.UIT

action:
  - choose:
      - conditions:
          - condition: trigger
            id: Loxone.AAN
        sequence:
          - service: switch.turn_on
            target:
              entity_id: !input matter_entity

      - conditions:
          - condition: trigger
            id: Loxone.UIT
        sequence:
          - service: switch.turn_off
            target:
              entity_id: !input matter_entity

      - conditions:
          - condition: trigger
            id: Matter.AAN
        sequence:
          - service: switch.turn_on
            target:
              entity_id: !input loxone_entity

      - conditions:
          - condition: trigger
            id: Matter.UIT
        sequence:
          - service: switch.turn_off
            target:
              entity_id: !input loxone_entity

mode: single```
1 Like

It is unclear to me what you want me to do concerning the My link.