rogro82/hass-variables

Can't seem to set attributes

Opened this issue · 0 comments

Hello,

First thank you very much for your code. Im happily using it.
At first I've used all seperate variable's for a single item, which I now try to put into one variable with different attributes but I can't seem to set them..

When I use the code to set just the state value it works fine. When I add the code (from the examples) to set attributes as well it doesn't work at all (including state)

My code:

- service: variable.set_variable
  data_template:
    variable: monica
    value: "{{ states.vacuum.monica.state }}"
    attributes_template: >
      {
        "cleaned_in_away_mode": 1,
        "cleaned_in_away_mode_finished": 0
      }