Read the statement by Michael Teeuw here.
MMM-homeassistant-sensors
-
I would like to send a notification, when a sensor changes its value,
like the solar production value.
How to set the ‘stateVals’ array in that case ?Example :
{ sensor: "sensor.solarproduktion", notificationName: "MMM-EnergyMonitor_SOLAR_POWER_UPDATE", notificationConditions: [ { stateVals: [?????????], notificationVal: "%v%" } ], name: "Produktion", },
-
I’m the one who wrote this functionality for this module, and I didn’t exactly design it to be able to send a notification for every state change. I designed it to look for a specific state and send a notification when the state matches something you’re looking for.
For example, if you want something to happen when your smart lock is in the unlocked state.
That being said, I just looked at the code again, and I don’t think it would be too difficult to modify it to notify on every state change if stateVal is empty.
Give me some time and I’ll see what I can do to make this happen for you.
I assume you would want the notification to return the current state of the sensor?