Find sensor attributes

Hello

I’ve been using HA for 8 months or so now and I have just realised I have no idea how to get the attributes of say a sensor.

How would I list all the attributes of this please?
binary_sensor.bathroom_sensor

I know it has battery but only as I copied a template from here… Any help is always greatly accepted :slight_smile:
Cheers
Mark

Read:

and / or

thanks I have already read those, what I am wanting to know is
how can I find each attribute for a particular sensor?

i.e. in the examples
it has
states.sun.sun.attributes.elevation, how can I find/list each attribute of sun.sun please?

Take a look in “Developer Tools/States” ??

Thanks. I do look there, I just though some had more attributes than were actually shown here?

Am I over thinking this again? I often do that :slight_smile:

In the DevTools/States you see all available attributes. You can then ask for a specific one to use in an Automation or Script via state.attributes

1 Like

ok cool thanks… So I was trying to over complicate it as I was doing that already… I just thought there were more