#Using `mqtt_room`

1 messages ยท Page 1 of 1 (latest)

fresh salmon
#

Well, that'd populate an entity or entities - and you use their state

lyric lintel
fresh salmon
#

Great, so check the state

#

Using mqtt_room

lyric lintel
#

the problem is that the only attribute there is distance instead of room presense

#

here's a screenshot

#

hmm.. I can't post screenshots

spark caveBOT
#

Please use imgur or other image sharing web sites, and share the link here.

Image posting is blocked in most channels to discourage people from sharing text as images. Sharing text as images assumes that everybody sees the world as you do, which isn't the case. Some people are colour blind, or have visual impairment that means they can't make sense of an image of text.

lyric lintel
#

in any case, the entity doesn't expose the room presence. only distance

fresh salmon
#

What's the source device?

lyric lintel
#

source device is my mobile phone

fresh salmon
#

And ... what's on the phone that's publishing to MQTT?

#

Or did you misunderstand the question ๐Ÿ˜‰

lyric lintel
#

I guess I misundertood ๐Ÿ™‚

fresh salmon
#

What's publishing to MQTT for that topic

lyric lintel
#

the ibeacon of the phone?

fresh salmon
#

You tell me, don't ask me

#

You have some software running that's doing it

lyric lintel
#

the phone is pinging the espresense device

fresh salmon
#

Ah... finally

#

espresense

lyric lintel
#

I read that, but it didn't provide an example of how to use it in automation

#

I mean, I need a condition set in place

#

that condition being the state of the service.galaxy_s23

#

either not_home or gil_s_office

fresh salmon
#

Well, it's just an entity

lyric lintel
#

and if not_home == true proceed to turn off the lights

fresh salmon
#

There's nothing special about using it

#

A standard state trigger is what you need

lyric lintel
#

but HA doesn't expose an easy way to utilize the not_home variable

fresh salmon
#

What?

#

Entity state

#

That's all

lyric lintel
#

yes

fresh salmon
#

Just as with every entity

#

How can you not "use" it?

lyric lintel
#

but as you can see in my screenshot, that entity only provides distance, not the state

fresh salmon
#

Yes, I can see it

lyric lintel
#

imgur made my image hidden

#

can you see the screenshot now?

spark caveBOT
fresh salmon
#

Look at the entity there

#

Also, you're picking the attribute, so there's only one

#

You should be just using the state

lyric lintel
fresh salmon
#

There you go

lyric lintel
#

I don't understand

fresh salmon
#

What part?

lyric lintel
#

you are saying there you go as if the answer is there ๐Ÿ˜„ but I'm not picking it up

#

that entity only has distance

#

I don't know how to explain what I don't undertand that I should understand ๐Ÿ™‚

fresh salmon
#

No, it doesn't

lyric lintel
#

I expected to have a drop down menu with values of not_home and gil_s_office

#

and I'm not sure why I don't have them as options

fresh salmon
#

You're looking at attributes, so that's what you're getting

#

Don't click in the attributes box

lyric lintel
#

ok so should I just manually type gil_s_office in the state field?

fresh salmon
#

Sure

lyric lintel
#

do I need to add it as a trigger, or just as a condition to check?

spark caveBOT
#

There are three sections to an automation:

  • trigger: When any one of these becomes true the automation starts processing. Only one trigger is ever responsible for starting an automation, if you make a condition that checks for more than one having started the automation then the condition can never be true.
  • condition: These are checked after a trigger starts the processing, and must be true for the automation to continue.
  • action: This is the part that does something, and can also include further conditions.
fresh salmon
#

Depends on what you're trying to do

lyric lintel
#

not turn off the lights when I'm in the room ๐Ÿ˜„