Alarms (or, “notifications”) are now implemented. Polling for them every minute. Very untested.
Note that if you’ve used the Ondus rather than the newer Sense app, you’ll likely have a very long list of notifications in the sensor when you start, seems like the Ondus app (at least for me) was not very consistent in marking notifications as read.
(Working on water on/off. As a heads-up, that change will likely require an update to the configuration file (as the integration will then implement both sensors and a switch))
Had a bit more time, so there’s now also support for turning the water on/off. Added a new switch (so, careful if you have anything using group.all_switches) called valve for each Grohe Sense Guard detected. Note that you need to update your config file (moving the config being under sensor platform, to being standalone).
Again, very untested. I’ve clicked around a few times myself and it seems to work, but the only way I have to test this is “in production” affecting the water supply of my own house, so, as you may imagine, I haven’t really gone wild with experimentation here.
Thanks a lot for the update! However I have not made working. I’ve uploaded the new files, removed the grohe_sense from the sensor config, and put it in configuration.yaml:
grohe_sense:
refresh_token: "MY_REFRESH_TOKEN"
But I get:
Invalid config for [grohe_sense]: [refresh_token] is an invalid option for [grohe_sense]. Check: grohe_sense->refresh_token. (See ?, line ?). Please check the docs at https://home-assistant.io/integrations/grohe_sense/
I’ve been trying to reproduce the error, without any success so far. If I read the home assistant source code correctly, the error message you’re getting indicates that it thinks refresh_token is a superfluous option.
Can you describe a bit more how you run home assistant (docker, hass, python venv, …)? I’ve tried slightly older versions + the latest on both docker and as venv without being able to reproduce.
One thing that is weird about the error message you show is the path from “Check”, it says Check: grohe_sense->refresh_token. When I add a superfluous value (foo) to my config, I get the same error, but with a Check: of grohe_sense->grohe_sense->foo (note that grohe_sense appears twice). Is that the same for you?
One slightly desperate thing to test: I spotted a leftover import of PLATFORM_SCHEMA in __init__.py. I don’t see how that would cause what you’ve observed, but you could try removing it.
I get:
Invalid config for [grohe_sense]: [foo] is an invalid option for [grohe_sense]. Check: grohe_sense->grohe_sense->foo. (See /config/configuration.yaml, line 62). Please check the docs at https://home-assistant.io/integrations/grohe_sense/
Gives:
Invalid config for [grohe_sense]: [foo] is an invalid option for [grohe_sense]. Check: grohe_sense->grohe_sense->foo. (See /config/configuration.yaml, line 60). Please check the docs at https://home-assistant.io/integrations/grohe_sense/
I tried commenting out the line with PLATFORM_SCHEMA without any change.
Thanks for testing things! So weird with a bug that appears on hass.io but not with the home assistant docker image, I would have assumed those would be very close to each other in behaviour.
I still don’t have a theory for what can cause this. One thing to try would be if you would be able to test with a minimal config (e.g., just using a completely default config and only adding grohe_sense to it, just to exclude any other weird interactions).
Another (easier) thing to test would be to change the definition of CONFIG_SCHEMA in __init__.py to allow for extraneous values also in the inner schema. With luck, this may at least yield a new error message that can perhaps shed some light at what’s going on. The change would be to something like this (the important part is the added extra=vol.ALLOW_EXTRA).
Ok, that result has me really confused. As far as I understand, the error you seeing should not be possible to trigger with that CONFIG_SCHEMA. When I make the change to include the other ALLOW_EXTRA, I can add new keys without any errors. It almost feels like some other schema is also being applied, but I don’t understand where it could come from (my accidental import of PLATFORM_SCHEMA would be my primary suspicion, but we’ve already tried removing that).
One thing to try if you feel comfortable enough around docker would be the following from a shell on your machine (assuming you have ssh enabled on your hassio): docker ps to figure out the name of your home assistant container (I’d guess it’s “home-assistant” or similar) docker exec -it home-assistant /bin/bash (replace “home-assistant” with the name you found, starts a bash shell in your home assistant container) python (starts an interactive python shell)
Then paste the following (which reads in your config file and tries schema validation). If we’re lucky, the last line of this long sequence will produce an exception that may tell us what’s going on. If we’re unlucky, then nothing is printed. If so, that would further strengthen my suspicion that some other config validation is applied.
This is really strange. After a lot of restarts and commenting out config, and uncommenting again, everything seems to work. Obviously an error on my side. Really sorry for taking your time, and thank you a lot for your support and your work with this integration!!
Great to hear that it’s working now! I sure wonder what the error was, it’s not really consistent with any user error in the config file (it sure seemed to be applying a schema validation from somewhere wrong). If you happen to figure it out, please report back here, as there was at least one more person with the same issue above.
Was finally able to reproduce, and figure out what the error was. As far as I can tell, the error shows up when you press “Check Config” in the Server Control UI, but does not actually impact anything if you just ignore it and start the server. The error is due to the PLATFORM_SCHEMA I had accidentally moved over to __init__.py. I’ve pushed a fixed version to Github. Note that even after copying these files in, Check Config will show an error until you’ve restarted Home Assistant with the fixed code (modifying python files while Home Assistant is running will not change the code that’s running).
I also tried pasting only the part after ondus:// from the redirect link, replacing ondus with https, but then i don`t even get a json return.
Does this method not work anymore, is it me being unable to follow simple instructions, or is this something that can only be done once? (ref guide: will likely only work once, and will expire, so don’t be too slow)
*I always restart my browser and all browser data is cleared between each attempt.
Probably at attempt 400 by now
Update: tried chrome instead of firefox, and it magically worked.