Is there a list of attributes?

Iḿ relatively new in HA configuration. Everything I tried works fine because of that very good documentation. Iḿ missing one thing and dont know where to find. Maybe someone can help me. I choose an example to eplain what is my problem:
I’d like to configurate my CH thermostats.

  alias: Kitchen warm

trigger:

  • entity_id: device_tracker.mobile
    from: ‘off’
    platform: state
    to: ‘on’
    condition: []
    action:
    • service: climate.set_temperature
      data:
      entity_id: climate.kitchen_thermostat_1
      temperature: 26
      operation_mode: Heat

That works fine. But there are a lot of attributes I can use for “climate.set_temperature”.
I can find the list of attributes but I do not find an overview of how do use them. Where do I find for example what can I set for “operation_mode”? In my case it is “Heat”. But I dont know if there are other possibilities.

Check out templates under developer tools. Here is an example that worked for me.

{{ states.climate.shop_heater }}

3 Likes

The documentation covers what can be set. Not all attributes can be set, in fact many can only be viewed.

Take a look at the climate documentation. It spells out every attribute that can be set for a given service:

Hi petro, thanks a lot. But that is not my problem. I need to know what are the possible values for the attributes. Like:“home/away”, “true/false” and so on.

Hi, Ron. This was only an example. The ch is working. I’d like to know where to find an overview for the possible values for the attributes. In general, not only for the given example

What you are asking for doesn’t exist. Attribute values are pulled from all over the place. Some are basic strings that come directly from hardware, i.e. only the hardware knows what the setting will be. @RonJ103’s method gives you the ability to see what the output is at any desired time.

To use @RonJ103’s method for other areas, you just need to provide the correct domain and object_id for the states machine.

states.domain.object_id

For example, if you have a light and you want to know it’s attributes. Call the domain.object_id from the states machine. In this example our entity_id is light.my_light. Also, keep in mind that domain.object_id equals entity_id. So knowing that, to view the current state object:

states.light.my_light

so to view attributes:

states.light.my_light.attributes

Remember, that doesn’t mean you can call a service and adjust it. Also, remember attributes have no restrictions. Anything can be added to attributes. Hell, you could add an attribute to any state object through customization.

1 Like

Is it wrong, when I think there is a predefined amount of values that an attribute can have? Like " drevice_tracker with “home” and “away”?

Well in your example, device_tracker can also display a zone name if you configured a zone. Some components will list possible outcomes, some don’t. You should always check the documentation page for the component you are dealing with. If that doesn’t give you the information you need, hit up the template editor.

Ah, ok. I understand. Iḿ using this component: https://www.home-assistant.io/components/maxcube/
I dont know where to find the information how i can “talk” to the component. Would be nice if you could show that (i understand it as the “dictionary” of the item)?

If you go to the dev-state page of your Home Assistant, and find the entity, you will see all the attributes in the table.

Thanks, flamingm0e. Thats exactly what I was searching for.

Just an FYI, all the information in the dev-state page is present in the method that @RonJ103 said.
image

3 Likes

You will see the attributes but normally not see all possible values, e.g. you will see that a device_tracker shows ‘home’ but you will not see that another value for the device tracker is ‘not_home’ - and not ‘away’.

There might be a few, though, that show you a list of potential options, e.g. here is some of the info from my thermostat:

operation_mode=heat, operation_list=['off', 'heat', 'cool', 'auto']

I´m wondering why this is so. Everything is documented very detailed. And that part is missing. So I have to guess

4 Likes