Exemple Xiaomi Miscale select the person who weighs himself "notif action"

Hello, I share my red node to select the person who weighs himself via the action notification.
As we can only do 3 actions maximum I split the users with a weight greater or less than 50kg

You can then use the bodimiscale custom components to use your data
https://community.home-assistant.io/t/custom-component-bodymiscale-for-xiaomi-miscale-1-2-esphome-or-ble-monitor/253542/8

Sans titre

[{"id":"449ac5cc.7a0abc","type":"tab","label":"Balance Connectée","disabled":false,"info":""},{"id":"54855646.8cde28","type":"server-state-changed","z":"449ac5cc.7a0abc","name":"Poids","server":"a8c279c8.be8be8","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.xiaomi_mi_scale_weight","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"num","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":70,"y":80,"wires":[["ce82deff.cb494"]]},{"id":"21841a17.717626","type":"api-call-service","z":"449ac5cc.7a0abc","name":"Notification","server":"a8c279c8.be8be8","version":1,"debugenabled":false,"service_domain":"notify","service":"mobile_app_smartphone_aurelien","entityId":"","data":"{\"title\":\"Balance Connectée\",\"message\":\"Qui est sur la balance avec le poids de {{ payload }} kg ?\",\"data\":{\"actions\":[{\"action\":\"Sacha\",\"title\":\"Sacha\"},{\"action\":\"Noham\",\"title\":\"Noham\"}]}}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":410,"y":60,"wires":[[]]},{"id":"7be24aa0.3bfe84","type":"server-events","z":"449ac5cc.7a0abc","name":"Réponse notification","server":"a8c279c8.be8be8","event_type":"mobile_app_notification_action","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"waitForRunning":true,"x":110,"y":560,"wires":[["6a5e651d.7ac02c"]]},{"id":"6a5e651d.7ac02c","type":"switch","z":"449ac5cc.7a0abc","name":"","property":"payload.event.action","propertyType":"msg","rules":[{"t":"eq","v":"Aurelien","vt":"str"},{"t":"eq","v":"Siham","vt":"str"},{"t":"eq","v":"Theo","vt":"str"},{"t":"eq","v":"Sacha","vt":"str"},{"t":"eq","v":"Noham","vt":"str"}],"checkall":"true","repair":false,"outputs":5,"x":290,"y":560,"wires":[["8adcb35.40ec25","4e1d75ec.9ef92c"],["2f38895c.6535f6","22867545.4e654a"],["4ac5d546.51219c","c730db95.5511d8"],["9d0744e0.dd8b38","a7ffae54.6dcd2"],["74cce82a.7361d8","fd3f8b8f.91b938"]]},{"id":"ce82deff.cb494","type":"switch","z":"449ac5cc.7a0abc","name":"Poids 50 kg","property":"payload","propertyType":"msg","rules":[{"t":"lte","v":"50","vt":"str"},{"t":"gte","v":"50","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":230,"y":80,"wires":[["21841a17.717626"],["46ea1914.b76bb8"]]},{"id":"46ea1914.b76bb8","type":"api-call-service","z":"449ac5cc.7a0abc","name":"Notification","server":"a8c279c8.be8be8","version":1,"debugenabled":false,"service_domain":"notify","service":"mobile_app_smartphone_aurelien","entityId":"","data":"{\"title\":\"Balance Connectée\",\"message\":\"Qui est sur la balance avec le poids de {{ payload }} kg ?\",\"data\":{\"actions\":[{\"action\":\"Aurelien\",\"title\":\"Aurelien\"},{\"action\":\"Siham\",\"title\":\"Siham\"},{\"action\":\"Theo\",\"title\":\"Theo\"}]}}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":410,"y":120,"wires":[[]]},{"id":"e0f48aa8.4ebc68","type":"ha-entity","z":"449ac5cc.7a0abc","name":"Poids Sacha","server":"a8c279c8.be8be8","version":1,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"Weight Sacha"},{"property":"device_class","value":""},{"property":"icon","value":"mdi:weight-kilogram"},{"property":"unit_of_measurement","value":"kg"}],"state":"payload","stateType":"msg","attributes":[],"resend":true,"outputLocation":"","outputLocationType":"none","inputOverride":"allow","x":710,"y":620,"wires":[[]]},{"id":"d0fe40dd.aa4ad","type":"ha-entity","z":"449ac5cc.7a0abc","name":"Poids Noham","server":"a8c279c8.be8be8","version":1,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"Weight Noham"},{"property":"device_class","value":""},{"property":"icon","value":"mdi:weight-kilogram"},{"property":"unit_of_measurement","value":"kg"}],"state":"payload","stateType":"msg","attributes":[],"resend":true,"outputLocation":"","outputLocationType":"none","inputOverride":"allow","x":720,"y":740,"wires":[[]]},{"id":"d40dcb04.d1d6a8","type":"ha-entity","z":"449ac5cc.7a0abc","name":"Poids Théo","server":"a8c279c8.be8be8","version":1,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"Weight Théo"},{"property":"device_class","value":""},{"property":"icon","value":"mdi:weight-kilogram"},{"property":"unit_of_measurement","value":"kg"}],"state":"payload","stateType":"msg","attributes":[],"resend":true,"outputLocation":"","outputLocationType":"none","inputOverride":"allow","x":710,"y":500,"wires":[[]]},{"id":"fd8f72be.6c546","type":"ha-entity","z":"449ac5cc.7a0abc","name":"Poids Siham","server":"a8c279c8.be8be8","version":1,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"Weight Siham"},{"property":"device_class","value":""},{"property":"icon","value":"mdi:weight-kilogram"},{"property":"unit_of_measurement","value":"kg"}],"state":"payload","stateType":"msg","attributes":[],"resend":true,"outputLocation":"","outputLocationType":"none","inputOverride":"allow","x":710,"y":380,"wires":[[]]},{"id":"d784d1fc.3574a","type":"ha-entity","z":"449ac5cc.7a0abc","name":"Poids Aurélien","server":"a8c279c8.be8be8","version":1,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"Weight Aurélien"},{"property":"device_class","value":""},{"property":"icon","value":"mdi:weight-kilogram"},{"property":"unit_of_measurement","value":"kg"}],"state":"payload","stateType":"msg","attributes":[],"resend":true,"outputLocation":"","outputLocationType":"none","inputOverride":"allow","x":700,"y":260,"wires":[[]]},{"id":"645c197d.376198","type":"ha-entity","z":"449ac5cc.7a0abc","name":"Impedance Siham","server":"a8c279c8.be8be8","version":1,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"Impedance Siham"},{"property":"device_class","value":""},{"property":"icon","value":"mdi:omega"},{"property":"unit_of_measurement","value":"ohm"}],"state":"payload","stateType":"msg","attributes":[],"resend":true,"outputLocation":"","outputLocationType":"none","inputOverride":"allow","x":730,"y":440,"wires":[[]]},{"id":"5be0f792.71a698","type":"ha-entity","z":"449ac5cc.7a0abc","name":"Impedance Théo","server":"a8c279c8.be8be8","version":1,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"Impedance Théo"},{"property":"device_class","value":""},{"property":"icon","value":"mdi:omega"},{"property":"unit_of_measurement","value":"ohm"}],"state":"payload","stateType":"msg","attributes":[],"resend":true,"outputLocation":"","outputLocationType":"none","inputOverride":"allow","x":730,"y":560,"wires":[[]]},{"id":"a6f7df44.e392","type":"ha-entity","z":"449ac5cc.7a0abc","name":"Impedance Aurélien","server":"a8c279c8.be8be8","version":1,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"Impedance Aurélien"},{"property":"device_class","value":""},{"property":"icon","value":"mdi:omega"},{"property":"unit_of_measurement","value":"ohm"}],"state":"payload","stateType":"msg","attributes":[],"resend":true,"outputLocation":"","outputLocationType":"none","inputOverride":"allow","x":740,"y":320,"wires":[[]]},{"id":"445a7773.55e788","type":"ha-entity","z":"449ac5cc.7a0abc","name":"Impedance Sacha","server":"a8c279c8.be8be8","version":1,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"Impedance Sacha"},{"property":"device_class","value":""},{"property":"icon","value":"mdi:omega"},{"property":"unit_of_measurement","value":"ohm"}],"state":"payload","stateType":"msg","attributes":[],"resend":true,"outputLocation":"","outputLocationType":"none","inputOverride":"allow","x":730,"y":680,"wires":[[]]},{"id":"ea3bee11.4232d","type":"ha-entity","z":"449ac5cc.7a0abc","name":"Impedance Noham","server":"a8c279c8.be8be8","version":1,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"Impedance Noham"},{"property":"device_class","value":""},{"property":"icon","value":"mdi:omega"},{"property":"unit_of_measurement","value":"ohm"}],"state":"payload","stateType":"msg","attributes":[],"resend":true,"outputLocation":"","outputLocationType":"none","inputOverride":"allow","x":730,"y":800,"wires":[[]]},{"id":"8adcb35.40ec25","type":"api-render-template","z":"449ac5cc.7a0abc","name":"Poids balance","server":"a8c279c8.be8be8","template":"{{ states('sensor.xiaomi_mi_scale_weight') | float }}","resultsLocation":"payload","resultsLocationType":"msg","templateLocation":"template","templateLocationType":"msg","x":500,"y":260,"wires":[["d784d1fc.3574a"]]},{"id":"4e1d75ec.9ef92c","type":"api-render-template","z":"449ac5cc.7a0abc","name":"Impedance balance","server":"a8c279c8.be8be8","template":"{{ states('sensor.xiaomi_mi_scale_impedance') | int }}","resultsLocation":"payload","resultsLocationType":"msg","templateLocation":"template","templateLocationType":"msg","x":510,"y":320,"wires":[["a6f7df44.e392"]]},{"id":"22867545.4e654a","type":"api-render-template","z":"449ac5cc.7a0abc","name":"Impedance balance","server":"a8c279c8.be8be8","template":"{{ states('sensor.xiaomi_mi_scale_impedance') | int }}","resultsLocation":"payload","resultsLocationType":"msg","templateLocation":"template","templateLocationType":"msg","x":510,"y":440,"wires":[["645c197d.376198"]]},{"id":"2f38895c.6535f6","type":"api-render-template","z":"449ac5cc.7a0abc","name":"Poids balance","server":"a8c279c8.be8be8","template":"{{ states('sensor.xiaomi_mi_scale_weight') | float }}","resultsLocation":"payload","resultsLocationType":"msg","templateLocation":"template","templateLocationType":"msg","x":500,"y":380,"wires":[["fd8f72be.6c546"]]},{"id":"c730db95.5511d8","type":"api-render-template","z":"449ac5cc.7a0abc","name":"Impedance balance","server":"a8c279c8.be8be8","template":"{{ states('sensor.xiaomi_mi_scale_impedance') | int }}","resultsLocation":"payload","resultsLocationType":"msg","templateLocation":"template","templateLocationType":"msg","x":510,"y":560,"wires":[["5be0f792.71a698"]]},{"id":"4ac5d546.51219c","type":"api-render-template","z":"449ac5cc.7a0abc","name":"Poids balance","server":"a8c279c8.be8be8","template":"{{ states('sensor.xiaomi_mi_scale_weight') | float }}","resultsLocation":"payload","resultsLocationType":"msg","templateLocation":"template","templateLocationType":"msg","x":500,"y":500,"wires":[["d40dcb04.d1d6a8"]]},{"id":"a7ffae54.6dcd2","type":"api-render-template","z":"449ac5cc.7a0abc","name":"Impedance balance","server":"a8c279c8.be8be8","template":"{{ states('sensor.xiaomi_mi_scale_impedance') | int }}","resultsLocation":"payload","resultsLocationType":"msg","templateLocation":"template","templateLocationType":"msg","x":510,"y":680,"wires":[["445a7773.55e788"]]},{"id":"9d0744e0.dd8b38","type":"api-render-template","z":"449ac5cc.7a0abc","name":"Poids balance","server":"a8c279c8.be8be8","template":"{{ states('sensor.xiaomi_mi_scale_weight') | float }}","resultsLocation":"payload","resultsLocationType":"msg","templateLocation":"template","templateLocationType":"msg","x":500,"y":620,"wires":[["e0f48aa8.4ebc68"]]},{"id":"fd3f8b8f.91b938","type":"api-render-template","z":"449ac5cc.7a0abc","name":"Impedance balance","server":"a8c279c8.be8be8","template":"{{ states('sensor.xiaomi_mi_scale_impedance') | int }}","resultsLocation":"payload","resultsLocationType":"msg","templateLocation":"template","templateLocationType":"msg","x":510,"y":800,"wires":[["ea3bee11.4232d"]]},{"id":"74cce82a.7361d8","type":"api-render-template","z":"449ac5cc.7a0abc","name":"Poids balance","server":"a8c279c8.be8be8","template":"{{ states('sensor.xiaomi_mi_scale_weight') | float }}","resultsLocation":"payload","resultsLocationType":"msg","templateLocation":"template","templateLocationType":"msg","x":500,"y":740,"wires":[["d0fe40dd.aa4ad"]]},{"id":"a8c279c8.be8be8","type":"server","name":"Home Assistant","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]

Hi @dckiller51 ,

To have this working, does it need to have weight ranges? Meaning that if two users have similar weights, will it work?

By this node red no worries. This is precisely why I made this node red. After the weighing you select the user and this increments the correct weight.

Selecting where? It can’t be automatic like what offers the Mi Fit app, I guess?

Got the notification massages now, but no action options can be selected. how it work right? or it only works in IOS?

Hi there,
Sorry for this fool question, but I am new to NodeRed and I am not seeing whats the easiest way to add this solution to my house.

Am I supposed to paste this code in a new NodeRed flow and adjust the variables names?
It doesnt work here.