Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


peejayw

1913 posts

Uber Geek
+1 received by user: 123


#305911 13-Jun-2023 11:28
Send private message

Because I had a spare Aqara door sensor I thought this project would add to my weather data nicely but my yaml knowledge consists of "cut and paste" and after that I am floundering.

 

I have manged to get the first sensor pasted into my config file but when I try to do the second one I get all sorts of errors, bad indentation etc and it affects other subsequent entries in the config file as well.

 

Clearly I am missing some essential skill here, I wonder if anyone could suggest how to get it working? I have the actual hardware all set up and that is showing when the bucket tips so I am happy with that.

 

Thanks.





 I'm supposed to respect my elders, but it's getting harder and harder for me to find one now.


View this topic in a long page with up to 500 replies per page Create new topic

This is a filtered page: currently showing replies marked as answers. Click here to see full discussion.

timmmay
20858 posts

Uber Geek
+1 received by user: 5350

Trusted
Lifetime subscriber

  #3089373 13-Jun-2023 12:24
Send private message

If you can't get it working put your YAML somewhere and I'll take a crack at it. I'm not an expert, I use YAML fairly often but still find it odd. Make sure your YAML uses spaces rather than tabs.




bigreddog
236 posts

Master Geek
+1 received by user: 117

Subscriber

  #3089825 14-Jun-2023 01:23
Send private message

Hard to tell (at this time of night) but, in your configuration.yaml file on line 14 you have:
template: !include templates.yaml

 

This means you are telling your Home Assistant config for all templates go and use the contents of the templates.yaml file as opposed to the main configuration.yaml file. So any template information you add to configuration.yaml will not be used.  I would suggest if you aren't using the separate files listed under !include then take these out of your config file as a first step.  Once you get to the stage where you are getting cluttered then think about re-instating the !includes - by then you will probably understand more about the way it all works.

 

For the formatting you want the layout looking like:

 

Also, you will normally need to restart HA to get the new sensors to show up (or use the YAML configuration reload tool on the Developers Tools).

 

There's lots of help on the HA community pages, but pay attention to the dates of the posts - many of the things referenced in the last couple of years may have changed.

 

Finally, I've found Github the best place to share yaml around - it keeps the formatting intact and easily readable 

 

Hopefully something there helps.  


View this topic in a long page with up to 500 replies per page Create new topic








Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.