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.


Filter this topic showing only the reply marked as answer View this topic in a long page with up to 500 replies per page Create new topic
1 | 2 
timmmay
20591 posts

Uber Geek

Trusted
Lifetime subscriber

  #3089584 13-Jun-2023 18:48
Send private message

Now that you've gotten past the YAML problem you may find the HA community who have experience with that particular device / integration more able to provide assistance. I look at it and have a general idea what it's doing, but I have no idea how to make it work. All I could do is check the logs, read about integration, and look at any threads about it on the HA forum.




peejayw

1841 posts

Uber Geek


  #3089585 13-Jun-2023 18:53
Send private message

OK, thanks for the help.





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


timmmay
20591 posts

Uber Geek

Trusted
Lifetime subscriber

  #3089587 13-Jun-2023 18:57
Send private message

I haven't been particularly helpful... but I gave it a shot :) I can probably help more with other parts of HA. HA has a heck of a learning curve, I can help with the parts I know, but that part... not so much.




peejayw

1841 posts

Uber Geek


  #3089588 13-Jun-2023 19:01
Send private message

Well I know even less but usually get there after floundering around a bit 😁. No one else seems to have my problem so I am pretty sure its my config setup to do with that "sensor.rainsensor_flips" that doesnt exist. Will keep tinkering.





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


bigreddog
198 posts

Master Geek

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.  


peejayw

1841 posts

Uber Geek


  #3089930 14-Jun-2023 09:55
Send private message

That was really helpful, I didnt realise that you could only have templates in one place or the other, not both. I checked my templates.yaml file and there was already code there so rather than try to move it out I put the "Rainfall today" template in there and the "Rainsensor flip" sensor in the config.yaml. Config is now good, no errors and in States I can now see Rainfall today, Rainsensor flips and Rainsensor. However, when I actuate the sensor, although I can see it switching, Rainsensor flips does not change from 0 so I still have something wrong somewhere.

 

Its great to learn something new and if you can suggest any more I would be grateful.





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


bigreddog
198 posts

Master Geek

Subscriber

  #3089998 14-Jun-2023 14:27
Send private message

I've never used History Stats before... but just had a quick play and made the Rainsensor Flips work just by changing the state to be "off" (double instead of single quotes).

 

The real problem I have now is I can see all sorts of (largely) pointless things I can do with these in my setup!  🤦‍♂️ 


 
 
 

Move to New Zealand's best fibre broadband service (affiliate link). Free setup code: R587125ERQ6VE. Note that to use Quic Broadband you must be comfortable with configuring your own router.
Tinkerisk
4235 posts

Uber Geek


  #3090043 14-Jun-2023 15:39
Send private message

timmmay:

 

You can backup your config within home assistant gui. Settings, System, Backups. I run HA Core so I have OS access and run Restic to back up the HA configuration file / automations / everything else nightly with Restic.

 

 

It has become easy now.

 

 

 

 





- NET: FTTH, OPNsense, 10G backbone, GWN APs, ipPBX
- SRV: 12 RU HA server cluster, 0.1 PB storage on premise
- IoT:   thread, zigbee, tasmota, BidCoS, LoRa, WX suite, IR
- 3D:    two 3D printers, 3D scanner, CNC router, laser cutter


peejayw

1841 posts

Uber Geek


  #3090046 14-Jun-2023 15:44
Send private message

Always good to learn a new trick 😁
I tried changing from single to double quotes 

 

 

 - platform: history_stats

 

    name: Rainsensor flips

 

    entity_id: binary_sensor.rainsensor_on_off_switch #The aqara sensor

 

    state: "off"

 

    type: count

 

    start: '{{ now().replace(hour=0, minute=0, second=0) }}'

 

    end: '{{ now() }}'

 

 

 

but flips still stay at 0 😞

 





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


timmmay
20591 posts

Uber Geek

Trusted
Lifetime subscriber

  #3090052 14-Jun-2023 15:53
Send private message

Tinkerisk:

timmmay:


You can backup your config within home assistant gui. Settings, System, Backups. I run HA Core so I have OS access and run Restic to back up the HA configuration file / automations / everything else nightly with Restic.



It has become easy now.


 


 



Handy. I use HA Core on Raspbian, so won't work for me. I use Restic on all my Linux and Windows machines for backups though, works well

I'm probably going to move to a docker container when I get around to it.

bigreddog
198 posts

Master Geek

Subscriber

  #3090132 14-Jun-2023 20:58
Send private message

Hmmm.. in the Developer Tools, under the State section check your sensor (binary_sensor.rainsensor_on_off_switch) and try triggering it manually and watch what states are reported - make sure the states of it are on/off and not open/close or any other odd combinations of this?

 

 

 

[edit for further information]
I have the same Aqara sensors that are shown on the link in the first post. My sensors report as open and closed. So presumably you would just need to figure out which is the event you want to report on and then replace the "off" (or 'off') with the correct term.  When i was testing, i used a Shelly switch for on/off to confirm it worked so that is a different entity with different states.

 

 


peejayw

1841 posts

Uber Geek


  #3090170 15-Jun-2023 07:33
Send private message

I finally got it to work, turned out it was an issue with the original registration of the Aqara sensor. I removed it and re-linked it and now it all works. A word of thanks to all for advice given, I am continuing to learn!
Now I just have to wait for some rain to see how well it works, as its in Auckland I shouldnt have to wait too long 😁





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


1 | 2 
Filter this topic showing only the reply marked as answer View this topic in a long page with up to 500 replies per page Create new topic





News and reviews »

Gen Threat Report Reveals Rise in Crypto, Sextortion and Tech Support Scams
Posted 7-Aug-2025 13:09


Logitech G and McLaren Racing Sign New, Expanded Multi-Year Partnership
Posted 7-Aug-2025 13:00


A Third of New Zealanders Fall for Online Scams Says Trend Micro
Posted 7-Aug-2025 12:43


OPPO Releases Its Most Stylish and Compact Smartwatch Yet, the Watch X2 Mini.
Posted 7-Aug-2025 12:37


Epson Launches New High-End EH-LS9000B Home Theatre Laser Projector
Posted 7-Aug-2025 12:34


Air New Zealand Starts AI adoption with OpenAI
Posted 24-Jul-2025 16:00


eero Pro 7 Review
Posted 23-Jul-2025 12:07


BeeStation Plus Review
Posted 21-Jul-2025 14:21


eero Unveils New Wi-Fi 7 Products in New Zealand
Posted 21-Jul-2025 00:01


WiZ Introduces HDMI Sync Box and other Light Devices
Posted 20-Jul-2025 17:32


RedShield Enhances DDoS and Bot Attack Protection
Posted 20-Jul-2025 17:26


Seagate Ships 30TB Drives
Posted 17-Jul-2025 11:24


Oclean AirPump A10 Water Flosser Review
Posted 13-Jul-2025 11:05


Samsung Galaxy Z Fold7: Raising the Bar for Smartphones
Posted 10-Jul-2025 02:01


Samsung Galaxy Z Flip7 Brings New Edge-To-Edge FlexWindow
Posted 10-Jul-2025 02:01









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.