Google Wifi configuration

Could someone please post their config for Google Wifi / OnHub?
(Is it even worth adding this? Does it provide useful info?)

I’ll post mine in a few hours - I’m stuck at work!

I group my Google wifi info with a few items from speedtest.net - this then shows me that everything is up and running and current internet speed. It’s a good general kind of “check” to see if the infrastructure needs attention or if it’s my kids downloading all the internets again.

1 Like

Ok:

sensor googlewifi:
  - platform: google_wifi

#SPEEDTEST	
sensor speedtest:
  platform: speedtest
  minute: 30
  hour:
    - 0
    - 2
    - 4
    - 6
    - 8
    - 10
    - 12
    - 14
    - 16
    - 18
    - 20
    - 22
  monitored_conditions:
    - ping
    - download
    - upload   

and the group:

Internet:
  - sensor.speedtest_download
  - sensor.speedtest_upload
  - sensor.speedtest_ping
  - sensor.hass_uptime
  - sensor.google_wifi_status
  - sensor.google_wifi_uptime
  - sensor.google_wifi_last_restart
  - sensor.google_wifi_current_version
  - sensor.google_wifi_local_ip
  - sensor.google_wifi_new_version

Gives you :

Thanks for posting that, brendanheyu, but it doesn’t work for me at all.


I must be missing something…

I thought maybe I needed to specify the host/IP but I’m not sure exactly how that’s supposed to look. The example config doesn’t show it (which is why I asked to have someone post theirs here). When that didn’t help I just added it as follows:

sensor googlewifi:
  - platform: google_wifi
  host: 10.88.7.1

After a restart, that left home-assistant unreachable.
WHY does this have to be so DIFFICULT?!

because your formatting is incorrect. ‘host’ cannot be on the same ‘level’ as - platform

You should ALWAYS verify the config is correct before restarting.

I fail to see the level of difficulty you are seeing. It is a pretty simple layout. Devices go into config, system reads config, system displays/controls devices/device info.

I DID verify the config. It returned no errors.
Where is it documented that ‘host’ cannot be on the same ‘level’ as ‘- platform’? How is a newbie supposed to know that? What is the correct formatting? And where is that documented?

It’s the yaml formatting. Has nothing to do with Home Assistant

As for failing to see the difficulty, maybe try to see it from my point of view…

I’m a tech-savvy guy, trying to get just ONE simple, little thing to work in hass.
I go to the docs and copy/paste the example config into my configuration.yaml
That doesn’t work.
I ask for someone to post their config and brendanheyu is nice enough to do so.
That doesn’t work, either.
I try to modify it as best I can using the information provided in the docs (which DON’T tell me where to place or how to format any of the options listed).
That renders my system unreachable.
And when I reach out for help, I can’t seem to get answers to the most important questions I’m asking. Could somebody please just say, “Hey, Donnie, here’s what I think you’re missing. Have a look at this [link].”

You really fail to see the difficulty I’m having?! I get that you’ve been doing it for long enough that it’s not difficult for you, but this is the most noob-UNfriendly program I’ve ever dealt with!

1 Like
1 Like

Thanks for posting that, silvrr. I’m now more confused than ever. If you would try to answer the following questions (which are not answered by the linked page – or if they are, it’s not clear to me), I’d really appreciate it.

  1. Why do some items start with a dash and others don’t? Even when they are (or appear to be if you’re a noobie) the same thing? I.e. ’ - platform’ (as shown in brendanheyu’s post) and ’ platform’ as shown in the example on the YAML page you linked?
  2. I think I get that a dash indicates that something is an item in a collection but why is “platform” sometimes an item in a collection and sometimes not?
  3. In the third example given on the YAML page:
sensor:
  - platform: mqtt
    state_topic: sensor/topic
  - platform: mqtt
    state_topic: sensor2/topic

Why is it not:

sensor:
  - platform: mqtt
    state_topic: sensor/topic
    state_topic: sensor2/topic

or:

sensor:
  - platform: mqtt
      state_topic: sensor/topic
  - platform: mqtt
      state_topic: sensor2/topic

or:

sensor:
  platform: mqtt
    state_topic: sensor/topic
  platform: mqtt
    state_topic: sensor2/topic

How am I supposed to know/understand the differences between those variations and what’s right/wrong?

NOTE: I just edited the above code blocks. I do understand the two space indentation - it’s the forum markup that I’m struggling with.

Home Assistant isn’t really ready for Joe User yet. This has been a topic of discussion for quite some time. You are required to learn a few things in order to use it. Or use a different product. Or wait to use it.

I’m sorry, I don’t see anything that you could be missing, unless you have errors in your configuration (not related to the Google Wifi) that are causing it to stop parsing your config. If you want help, the best thing is to post your configuration.yaml in its entirety minus your secret credentials.

because each instance is a NEW sensor. You can’t have multiple state_topics for a single sensor.

That’s all yaml and it’s format. Yaml is like XML or HTML. It’s a format for text. Yaml has the advantage of being ‘more human readable’ than XML or HTML.

Yaml is 100% dependent on spacing, by this i mean the number of spaces for each indent:

top_node:
  first_indent:
    second_indent:
      third_indent:
        - my
        - list
        - of 
        - multiple
        - items

Ok, so this is weather you have multiple items or just one. For example, this is a typical automation with 1 trigger:

    trigger:
      platform: state
      entity_id: sensor.mysensor

What if you wanted more triggers? Well you’d need to specify a list of triggers. The the problem is that yaml doesn’t understand when an item starts and stops because yaml is indent formatted.

    trigger:
      - platform: state   # FIRST ITEM START
        entity_id: sensor.mysensor # PART OF FIRST ITEM
      - platform: time # SECOND ITEM START
        etc... # PART OF SECOND ITEM

These dashes can be anywhere and they typically mean ‘a list of items’.

This is people being lazy or not understanding when it’s needed. Personally, I always use the dash. It’s only not needed when you only have 1 item.

Because the component was built to only handle 1 state topic. If you want more than one, you make more than one mqtt platform. This was done by design, it’s doesn’t have anything to do with yaml.

The config checker looks at the shape of the yaml. I’m not sure it actually verifies that the configuration itself is correct. This is what you are running into.

2 Likes

First off, THANK YOU SO MUCH for this!!! Finally, I feel like I’m starting to comprehend.

UGH! Not to me! I’ll take XML over this any day!

OK. I do get that part but your example is still helpful.

Ah ha! Now I’m starting to understand!

So, based on what I was trying to do, this would be correct?

sensor googlewifi:
  platform: google_wifi
    host: 10.88.7.1

Close, the platform: googlewifi needs to be placed inside the sensor section. The sensor section does not take any extra keywords. Yaml doesn’t accept spaces in section names either.

sensor:
  - platform: google_wifi
    host: 10.88.7.1

So if you look at the documentation you see this:

Everything you see there is a line item that will occur at the same indentation level as the platform: host, name, and monitored_conditions. monitored_condtions accepts an array of information that you may want. So a fully made config would look like this:

sensor:
  - platform: google_wifi
    host: 10.88.7.1
    name: My Google Wifi
    monitored_conditions:
      - 'current_version'
      - 'new_version'
      - 'uptime'
      - 'last_restart'
      - 'local_ip'
      - 'status'

But if you want everything, you don’t need to specify the monitored_conditions at all.

Host, Name, and Monitored Conditions are all OPTIONAL which means that they do not need to be specified for it to work.

What, in that documentation, tells me that? How am I supposed to know that without having you tell me? (Which I very much appreciate, BTW, but it would be nice to be self-sufficient! :grin: )

Wait… so the dash doesn’t indicate an indentation level?

top_node:
  - first_indent
    still_first_indent
      second_indent

??? or:

top_node:
  - first_indent
  still_first_indent
    second_indent

or:

top_node:
  - first_indent
      second_indent

And yet, it does not work! :confounded:
I’ll post my configuration.

Like I said before, it could be something else in your configuration.yaml that is messed up that prevents it from processing.

Wait – but this works for brendanheyu…?