Help with Mqtt trigger

Hi all.
I am struggling with Mqtt triggers.
The solax modbus has stopped working but I also use mqtt to get data off my inverter.
I want to use my sensor that is defined as mqtt inverter temperature to trigger turning a “light” on (it’s a switch).

The mqtt value is X 10 so I used the automatic automation builder but it’s not triggering !

Help please

Screenshot_2023-10-01-06-56-46-45_c3a231c25ed346e59462e84656a70e50|690x310

alias: Mqtt temp control over 35
description: Mqtt inverter over 35
trigger:
  - platform: numeric_state
    entity_id: sensor.solis_mqtt_inverter_temperature
    above: 340
    attribute: temperature
condition: []
action:
  - type: turn_on
    device_id: f1d55a02395908dae2923eccfed7f89c
    entity_id: f18d8b02e4a35f6591432afe7454352b
    domain: light
mode: single

If you click “more info” on the sensor.solis_mqtt_inverter_temperature in the dev tools what does it show? Does it ever go above 340? Mine looks like this:

There were also fixes in the latest versions of solax modbus https://github.com/wills106/homeassistant-solax-modbus
Which version are you using and which version of HA?. You should use the latest versions.

Hi

I am trying to move away from the solax integration and sticking to mqtt.

I had an automation setup but it’s relying on solax data and has failed so I’ve had crazy temps last few days.

OK but your inverter temp is never going above 70 °C. So the trigger will never fire.

So if you see this card, it tells me the temp with X10.

So I told it to turn on at 340 or even 34 and still nothing.

That’s how Iv set it up

When the attribute option is specified the trigger is compared to the given attribute instead of the state of the entity.
https://www.home-assistant.io/docs/automation/trigger/#numeric-state-trigger

So are you saying I don’t put anything in ‘attribute’ box?

Remove the whole line.

I’ve done that…still not triggering by the mqtt

Strange. But some of the solis MQTT sensors seem to be totally wrong. Inverter Temp 363 °C, DC2 Voltage is 2346V (?). Do you use a 3rd party integration for Solis MQTT?

Hi

I use something called pysolarman running in dietpi vm, and another dietpi vm acts as the mqtt broker.

Is HA also running on that system? If yes, which installation type did you use and what version of raspberry pi is it? If not, on which system is HA running?

Your action part does not look familiar to me. Was it created by the UI ?
You could try this instead in your automations.yaml file:

  action:
  - entity_id: light.xxxxxxx (put your entity id name here, e.g. bedroom_light)
    service: light.turn_on