@Tibertsmits wrote:
I’m trying to set up a sql sensor that comes from the database phpmyadmin. In phpmyadmin these are my sensors that are logged:
For displaying the humidity I have written the following SQL code:
SELECT * FROM states WHERE entity_id = 'sensor.humidity_2' ORDER BY last_changed DESC LIMIT 1
In phpmyadmin this code works fine and I get the latest updated humidity. In my configuration.yaml file, I placed the following to display the SQL sensor:
When I now request the value of the sensor, I get the following:
This all seems to be good, but when I request the value in phpmyadmin, I get a different value:
Also the sql sensor is not updated anymore and remains 76, even when I restart the hass.
What am I doing wrong here? Or how could I get it working?
Posts: 2
Participants: 1