Miele@home, miele@mobile component

The critique on the naming is the UI in HA and not your integration. It is good we can see a friendly name in the various cards in the Lovelace UI. What many of us are upset about is that the tools you use to define scripts, automations etc hide the real value and replace them with the friendly values. My wife will never look at the endless lists in e.g. the logbook. The logbook should show the real values. Or both. It could list the friendly and put the real value in paranthesis.

For your integration, you should add a couple of commonly used examples like mine (if it works without the from). It is the only Miele device I have with network so I do not know what good example there are for other devices. There is nothing that beats a good example. And the normally used values for sensors should be documented as well. Maybe I’ll submit a PR when I have learned more myself

2 Likes

If only the HA developers can read and do this!

  • 1 also migrated over following the older integration failure with HA 2206.6.7, all good now, just a bit of retweaking in node red

Not sure what the problem is here, I’ve got a similar automation that works fine for my devices (washer-dryer and dishwasher). This is the one for the washer-dryer, the most complicated part is the translation of the various programs for the notification:

alias: Waschtrockner - Benachrichtigungen
description: Verschickt Benachrichtigungen, wenn der Waschtrockner ein Programm beendet.
trigger:
  - platform: state
    entity_id: sensor.waschtrockner_status
    to: program_ended
    from: running
condition: []
action:
  - service: notify.everyone
    data:
      title: Waschtrockner
      message: >-
        {% set program_name =
        iif(program[states("sensor.waschtrockner_program")],
        program[states("sensor.waschtrockner_program")],
        states("sensor.waschtrockner_program")) %}  Ihre Wäsche ist fertig. Das
        Programm »{{ program_name }}«  wurde um {{ now().strftime('%-H:%M') }}
        Uhr beendet.
variables:
  program:
    no_program: Kein Programm
    cottons: Baumwolle
    minimum_iron: Pflegeleicht
    delicates: Feinwäsche
    woollens: Wolle
    silks: Seide
    starch: Stärken
    rinse: Spülen
    drain_spin: Pumpen/Schleudern
    curtains: Gardinen
    shirts: Oberhemden
    denim: Jeans
    proofing: Imprägnieren
    sportswear: Sportwäsche
    automatic_plus: Automatic plus
    outerwear: Outdoor
    pillows: Kopfkissen
    cool_air: Lüften kalt
    warm_air: Lüften warm
    rinse_out_lint: Flusen ausspülen
    dark_garments: Dunkle Wäsche
    separate_rinse_starch: Nur Spülen/Stärken
    first_wash: Neue Textilien
    cottons_hygiene: Baumwolle Hygiene
    steam_care: Finish Dampf
    freshen_up: Auffrischen
    trainers: Sportschuhe
    clean_machine: Maschine reinigen
    down_duvets: Daunendecken
    express_20: Express 20
    down_filled_items: Daunen
    cottons_eco: Baumwolle ECO
    quick_power_wash: QuickPowerWash
    eco_40_60: ECO 40-60
mode: queued
max: 10
1 Like

This is not working. When adding the integration, HA asks me to make a connection with Miele. Which I do, and after that it errors. It gives a blank error notice with only a Oke option. And nothing works afterwards. This was already happening to me with the old one. Any idea how to fix it? Cant find any logs of it.

With the update to Home Assistant 2022.7 the following warnings appeared in the log:

Logger: homeassistant.components.number
Source: components/number/__init__.py:220
Integration: Nummer (documentation, issues)
First occurred: 07:36:35 (1 occurrences)
Last logged: 07:36:35

custom_components.miele.number::MieleNumber is overriding deprecated methods on an instance of NumberEntity, this is not valid and will be unsupported from Home Assistant 2022.10. Please report it to the custom component author.

and

Logger: homeassistant.components.number
Source: components/number/__init__.py:152
Integration: Nummer (documentation, issues)
First occurred: 07:36:35 (5 occurrences)
Last logged: 07:36:35

custom_components.miele.number is setting deprecated attributes on an instance of NumberEntityDescription, this is not valid and will be unsupported from Home Assistant 2022.10. Please report it to the custom component author.

Thank you for reporting this. It s just a warning that certain functions will stop working from october 2022. It is already fixed in development and the message will dissapear in next release of the integration.

2 Likes

@astrandb I‘m using your integration for a dishwasher. Power on/off works with HA. But the door state is not reported: always closed. Even when powered on and open. In the Miele App its reported correctly.
Do you have any clues?

I’m having the same issue with my G7316 dishwasher. Door status is always reported to “OFF”.

Also, the latest version of the Miele@home app can also track consumables (detergent, salt, etc). Anyway of getting this exposed to HA too ?

@neuhausf @MikeQ Please make a diagnostic download from the dishwasher device page. Look for the value of signalDoor. The public API from Miele is only a subset of what they are using internally for the app. E.g. levels for consumables are not exposed in the public API.

I’ve have this component working for a while now for my disherwasher. I just added a new washing machine, it is in the miele app, but not showing up in HA. Do I need to reinstall?

The new device should appear after a restart of HA.

Thanks for the hint. I downloaded the diagnostics from the Miele device. signalDoor is always false. I guess, signalDoor isn’t supported for dishwashers at all:

Also I think it’s meaning is also different: signalDoor would be true, if a warning about the door is displayed on screen (close door to start program).

My experience is that this capability matrix is incomplete and somewhat incorrect. E.g. statusDoor is handled differently in different models of dishwashers.

I thought I tried that, but maybe second time lucky. It worked. Thanks.

As @astrandb has remarked, the matrix is often incorrect. The API did provide useful signalDoor values at least for some dishwashers (i.e. mine) in the past, but I’ve just checked and it is now always false. This might be a temporary glitch in the API or an intentional change by Miele. Unfortunately, as always they don’t provide useful changelogs for the API servers.

Thanks for the additional info. I just wrote Miele and asked them if they could support a useful door-state for dishwashers. Lets see what (or if) they answer :wink:

1 Like

Hi
I am new to HA but have had my Miele API working
But now it suddenly doesn’t work anymore
Is there anyone willing to help me get it working
Preferably online
BR Tommy

Please Call *4521431223
Thanks

A few days ago I had to restore my HA from backup because the USB Stick I used crashed after month and HA was “broken”.
Since restoring I am not able to use the Miele Integration any longer … :frowning:
I get an error message on every startup of HA (see below).
Any ideas for solving that problem?!

Thanks in advance!!


 This error originated from a custom integration.

Logger: homeassistant.setup
Source: custom_components/miele/miele_at_home.py:174
Integration: miele (documentation, issues)
First occurred: 09:51:24 (1 occurrences)
Last logged: 09:51:24
Error during setup of component miele
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 235, in _async_setup_component
    result = await task
  File "/config/custom_components/miele/__init__.py", line 419, in async_setup
    data_get_devices = await client.get_devices(lang)
  File "/config/custom_components/miele/miele_at_home.py", line 48, in get_devices
    home_devices = await self._get_devices_raw(lang)
  File "/config/custom_components/miele/miele_at_home.py", line 32, in _get_devices_raw
    if await self._session.refresh_token(self.hass):
  File "/config/custom_components/miele/miele_at_home.py", line 165, in refresh_token
    self._token = await hass.async_add_executor_job(
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/miele/miele_at_home.py", line 174, in sync_refresh_token
    return self._session.refresh_token(
  File "/usr/local/lib/python3.9/site-packages/requests_oauthlib/oauth2_session.py", line 452, in refresh_token
    self.token = self._client.parse_request_body_response(r.text, scope=self.scope)
  File "/usr/local/lib/python3.9/site-packages/oauthlib/oauth2/rfc6749/clients/base.py", line 448, in parse_request_body_response
    self.token = parse_token_response(body, scope=scope)
  File "/usr/local/lib/python3.9/site-packages/oauthlib/oauth2/rfc6749/parameters.py", line 441, in parse_token_response
    validate_token_parameters(params)
  File "/usr/local/lib/python3.9/site-packages/oauthlib/oauth2/rfc6749/parameters.py", line 448, in validate_token_parameters
    raise_from_error(params.get('error'), params)
  File "/usr/local/lib/python3.9/site-packages/oauthlib/oauth2/rfc6749/errors.py", line 399, in raise_from_error
    raise cls(**kwargs)
oauthlib.oauth2.rfc6749.errors.InvalidGrantError: (invalid_grant) 

Shut down HA and delete the file ‘.miele-token-cache’ in the ‘.storage’ directory.
Then restart HA and enter your Miele credentials.

1 Like