Skip to content

Conversation

@trandbert37
Copy link
Contributor

Device information

https://fr.mammotion.com/products/robot-tondeuse-yuka-mini?variant=50737233035553

Home Assistant Device information

YUKA mini 600 (YUKA mini 600)
par Mammotion

Checklist

  • I have created a single PR per device. When you have multiple submissions please create separate PR's.
  • For lights - I have only included the gzipped files (*.gz), not the raw CSV files.
  • For lights - I have provided a CSV file per supported color mode. Look that up in Developer Tools -> States

Additional info

@github-actions github-actions bot added enhancement New feature or request powerprofile labels Oct 13, 2025
@bramstroker
Copy link
Owner

Do you have power history for this device when having it connected to smart plug and running for a few charging cycles.
We need to have a look in the trickle charge state (when it reaches 100% battery level), let's see how it behaves and if we have captured this correctly.
In principle if will have 11.96 constant power consumption when 100% battery level.

@trandbert37
Copy link
Contributor Author

Do you want me to redo measurements of the full cycle from 0 to 100% or just measurements when the robot is plugged in and remains at 100%?

@bramstroker
Copy link
Owner

Do you want me to redo measurements of the full cycle from 0 to 100% or just measurements when the robot is plugged in and remains at 100%?

No you don't have to redo measurements, but I was referring to the HA history. When you still have the smart plug connected to the mower you can maybe share some history stats of several runs from the mover.
Than we can check the correctness of the profile.

@trandbert37
Copy link
Contributor Author

Yes, here is what I have:
image
You can download here:
history.csv

@bramstroker
Copy link
Owner

502554922-86eb6781-4f9e-472e-a175-5b291c8d3bce

Looking at the chart there is not much linear things going on during charging. This is only seen once at 20.00. Not sure why not all charging cycles show this pattern.

There are mainly 3 power levels to disect.
I took a lot of values from your CSV and calculated the averages.

  • Running (probably state mowing and returning). Average = 11.55
  • Charging (state docked, battery_level < 100). Average = 63.98
  • Fully charged (state docked, battery level = 100). Average = 2.12

I think we are very close to a reliable power profile to just map these states to certain power levels.

Could you also share the history of states of the mower? Than we can can see what the correct states are and build configuration accordingly to put in the model.json.

@trandbert37
Copy link
Contributor Author

Hi,
Thanks for your feedbacks.
Here is the requested data :)
image
history (1).csv

@bramstroker
Copy link
Owner

Thanks, these states seem something from your particular integration.

Each lawn_mower entity in HA should have one of following states:

Screenshot 2025-10-18 at 09 33 10

So you should have a look into the state of lawn_mover.{your_entity_name_here} entity.

Btw I just worked on adding a sample profile using composite strategy based on your figures.
#3536
Also added test and ironed out a bug.

@trandbert37
Copy link
Contributor Author

Oh nice, thanks. I will change it
image
history (2).csv

@bramstroker
Copy link
Owner

bramstroker commented Oct 18, 2025

It's translated in the frontend for you ;-). Could you also create CSV from the raw state values for the lawn_mower entity?
The light grey states on the left are a bit strange where we expect the lawn mower to be moving.

edit
sorry I see you have:

lawn_mower.francis,docked,2025-10-17T06:00:00.000Z
lawn_mower.francis,mowing,2025-10-17T06:18:19.993Z
lawn_mower.francis,returning,2025-10-17T06:18:30.078Z
lawn_mower.francis,docked,2025-10-17T06:18:50.152Z
lawn_mower.francis,mowing,2025-10-17T06:20:09.385Z
lawn_mower.francis,paused,2025-10-17T07:23:38.894Z
lawn_mower.francis,mowing,2025-10-17T07:24:37.210Z
lawn_mower.francis,paused,2025-10-17T07:27:09.955Z
lawn_mower.francis,mowing,2025-10-17T07:47:10.236Z
lawn_mower.francis,returning,2025-10-17T08:04:24.919Z
lawn_mower.francis,paused,2025-10-17T08:07:56.975Z
lawn_mower.francis,returning,2025-10-17T08:08:45.088Z
lawn_mower.francis,paused,2025-10-17T08:10:11.887Z
lawn_mower.francis,returning,2025-10-17T08:18:04.242Z
lawn_mower.francis,paused,2025-10-17T08:18:18.578Z
lawn_mower.francis,docked,2025-10-17T08:27:13.332Z
lawn_mower.francis,mowing,2025-10-17T09:18:10.314Z
lawn_mower.francis,returning,2025-10-17T10:29:17.061Z
lawn_mower.francis,paused,2025-10-17T10:30:37.940Z
lawn_mower.francis,mowing,2025-10-17T11:27:12.866Z
lawn_mower.francis,returning,2025-10-17T12:45:29.012Z
lawn_mower.francis,paused,2025-10-17T12:46:18.890Z
lawn_mower.francis,mowing,2025-10-17T13:43:54.022Z
lawn_mower.francis,returning,2025-10-17T15:05:30.994Z
lawn_mower.francis,paused,2025-10-17T15:07:28.920Z
lawn_mower.francis,mowing,2025-10-17T16:04:01.960Z
lawn_mower.francis,returning,2025-10-17T17:04:11.142Z
lawn_mower.francis,paused,2025-10-17T17:06:25.892Z

@bramstroker
Copy link
Owner

bramstroker commented Oct 18, 2025

hmm that's a pity as there seems only 3 times docked status. The other times it seems to falsly report paused.

Because mode paused also happens during mowing as you see in the beginning of the chart, we cannot differentiate if the mower is actually charging or not :-(

only thing we can do is by looking at the previous state.
When it goes from returning -> paused we can consider it to be charging.
In any other case paused means it's still undocked and paused during mowing.
However need to think how we can provide a way to do this in Powercalc without huge complications.

@trandbert37
Copy link
Contributor Author

I also have this sensor, is it possible to use it ?
image
history (3).csv

@bramstroker
Copy link
Owner

That sensor looks better, but than I consider it a bug in the integration, as the mower itself should definitely have docked as status. When it's charging it's always docked.
Which integration are you using to integrate the mower in HA? Is it a core integration or a custom integration?

Can you also share some information about this En charge sensor, from developer tools -> state attributes?
I will see if I can work out some robust solution.

But the best solution would be the lawn_mower state is fixed in the integration, so I suggest to submit an issue for that in the github tracker for that integration.

@trandbert37
Copy link
Contributor Author

I use this custom integration: https://github.com/mikey0000/Mammotion-HA
image

Indeed, I will see if I can make a pull request or just open an issue.

@bramstroker
Copy link
Owner

Thanks, I already found the integration and prepared a fix, with #3537.
I have a feature included in powercalc which allows entity_id to be dynamically replaced with another entity in the same device with certain device class.

[[entity_by_device_class:battery_charging]]

See the PR for the updated model.json.

@bramstroker
Copy link
Owner

Bug in the mammotion integration would be somewhere here:
https://github.com/mikey0000/Mammotion-HA/blob/main/custom_components/mammotion/lawn_mower.py#L161

Probably they need to check for charge_state first and when it is higher than 0 return DOCKED early.
But I don't know all the ins and outs.

This is the code for the binary sensor (charging yes/no)

https://github.com/mikey0000/Mammotion-HA/blob/main/custom_components/mammotion/binary_sensor.py#L34

@bramstroker
Copy link
Owner

LGTM!

@bramstroker bramstroker merged commit e74fa7a into bramstroker:master Oct 24, 2025
8 checks passed
@trandbert37
Copy link
Contributor Author

This doesn't seem to work 😢
image
history (4).csv

@bramstroker
Copy link
Owner

I didn't watch carefully after you made modifications to the profile, but there are a few things not right.

See here what changes needed to be done:
#3562

This matches the profile now I worked out and wrote tests for, as seen here: https://github.com/bramstroker/homeassistant-powercalc/blob/master/tests/testing_config/powercalc/profiles/test/lawn_mower/model.json

@trandbert37
Copy link
Contributor Author

The "Francis Power" entity in my screenshot is the one provided by Powercalc. We can see that the power is always 11.8W, while it is 2.15W during mowing and it should also vary during charging.

@bramstroker
Copy link
Owner

@trandbert37 Did you see/read my comment?
I've made changes to the profile after you let me know it wasn't working correctly.
So you must load the updated profile in HA to reflect the changes, than it should hopefully work better.
https://docs.powercalc.nl/library/library/#updating-the-library

@trandbert37
Copy link
Contributor Author

Oh sorry, it works during charge now. Thanks :)
But the power should be 2.15W for mowing and returning states

@bramstroker
Copy link
Owner

Ah sorry, I have put in wrong figures in the profile.
https://github.com/bramstroker/homeassistant-powercalc/blob/master/profile_library/mammotion/YUKA%20mini%20600/model.json#L107-L108

Could you try editing locally first until the profile works 100% all right.
Then after everything is verified to work correctly you can submit the final changes.

You should be able to edit the file:
config/.storage/powercalc_profiles/mammotion/YUKA mini 600/model.json
That's where the files are download from the built-in library.

You can also put the file in custom profile directory.

config/powercalc/profiles/mammotion/YUKA mini 600/model.json

That should override the downloaded profile. As instructed here: https://docs.powercalc.nl/library/library/#custom-models

@mikey0000
Copy link

mikey0000 commented Oct 31, 2025

Noting this, the Paused status matches the apps behaviour if it is mid mow, the integration exposes two more reliable sensors, charging and Device Position Type (CHARGE_ON)
to add to this

https://developers.home-assistant.io/docs/core/entity/lawn-mower/

explicitly states DOCKED as end of work,

@bramstroker
Copy link
Owner

Noting this, the Paused status matches the apps behaviour if it is mid mow, the integration exposes two more reliable sensors, charging and Device Position Type (CHARGE_ON) to add to this

https://developers.home-assistant.io/docs/core/entity/lawn-mower/

explicitly states DOCKED as end of work,

Thanks @mikey0000, makes sense. I considered it a bug in the integration, but reading the HA docs you are right it explicitely states the mower must be done mowing.
Currently the Powercalc profile is using the binary_sensor indicating charge state, so it's working already using the reliable sensor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request powerprofile

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants