miele icon indicating copy to clipboard operation
miele copied to clipboard

HA Automation Entity state for Miele Washing Machine not being recognised

Open Daz42 opened this issue 1 year ago • 6 comments

The problem

I am not entirely sure this is an issue with this integration but I have been asked to open an issue anyway. I have a Miele Washing Machine which is configured and appears to be working. I can turn the machine on and off and read the entity states. However, I have created an automation that sends a notification to my mobile phone when the entity sensor.washing_machine_status is 'finished'. However the automation never triggers (I can run it manually so the alert is being sent to my phone) despite the entity sensor.washing_machine_status showing 'finished'. Any help would one appreciated.

Also, I have a Miele Tumble Dryer also configured and an automation doing the same thing (not working).

I have a Gaggenau Dishwasher with the same automation which is working but using a different integration.

Any help would be appreciated.

Version of miele integration having the issue?

0.1.16

Version of Home Assistant Core having the issue?

2023.10.5

Anything in the logs that might be useful for us?

I am seeing these in the logs:

Error requesting miele data: Cannot connect to host api.mcs3.miele.com:443 ssl:default [Try again]

Additional information

No response

Daz42 avatar Oct 27 '23 13:10 Daz42

alias: End Washing machine
description: ""
trigger:
  - platform: state
    entity_id:
      - sensor.washing_machine_status_2
    to: program_ended
    for:
      hours: 0
      minutes: 1
      seconds: 0
condition: []
action:
  - service: tts.google_say
    data:
      entity_id: media_player.googlehome1449
      message: Програмата на пералнята приключи!
      language: bg
      cache: true
mode: single

This is my automation and it works perfect.

rudizl avatar Oct 27 '23 14:10 rudizl

This is my automation and it works perfect.

I am using this value "program_ended" as well and it works flawlessly. So I guess this is not an Integration problem and this issue can be closed...

N3rdix avatar Dec 20 '23 20:12 N3rdix

Hello rudizl & N3rdix, you have both provided an essential clue to what the problem is. The question as to if the issue was the integration or not still remains the question. When you examine the Miele Washing Machine and Heat Pump Dryer states (live and in history), you can see that the State is actually:

Program Ended

ie, capitalisation and a space in between the words

As soon as I changed it to

program_ended

ie, no capitalisation and an underscore in between the words

It now all works. So the question is: how do we know exactly what states to input if they are not the ones being reported by the integration? For now I am going to assume all lower case words and an underscore in between words (if more than one word).

Daz42 avatar Dec 24 '23 11:12 Daz42

It now all works. So the question is: how do we know exactly what states to input if they are not the ones being reported by the integration? For now I am going to assume all lower case words and an underscore in between words (if more than one word).

this might help with the states the integration provides: https://github.com/astrandb/miele/blob/d307a4869c44088e6078245c56c5bac2f3ef54be/custom_components/miele/const.py#L132C14-L132C14

N3rdix avatar Dec 24 '23 13:12 N3rdix

It now all works. So the question is: how do we know exactly what states to input if they are not the ones being reported by the integration? For now I am going to assume all lower case words and an underscore in between words (if more than one word).

this might help with the states the integration provides: https://github.com/astrandb/miele/blob/d307a4869c44088e6078245c56c5bac2f3ef54be/custom_components/miele/const.py#L132C14-L132C14

Thanks, that makes it clearer! It would however help if the integration reported the same states that we need to use in automations - since that is where I go to find states for other integrations - such as Bosch & home connect, the same states reported by each device are the ones you can leverage with automations.

Thanks both for giving me the essential clue.

Daz42 avatar Dec 24 '23 14:12 Daz42

That's what the Developer Tools in HA are for. All entity values on the frontend are ”translated” from their technical value, both from core integrations and custom ones.

mundschenk-at avatar Dec 24 '23 14:12 mundschenk-at