You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the query, I would like to get the result for the last maximum record for the previous month for the entity sensor.tarife_p1_meter_faza3_mesecno_5, which is some kind a tariff sensor (in Slovenia we call this a time block, because we also have a higher and lower tariff “winter/all else”).
The current query returns me the result for the first entry of the current month (which is the first record, because this time block came into effect on 2025-03-01 at 00:00:00) instead of the query showing me 0 (there was no data before that).
So, I would need the data for 2025-02-28 23:59:59, which actually does not exist.
Current query:
Let me try to explain what’s happening.
The table shows the billing system:
Translation:
Novi časovni bloki obračunavanja električne energije in omrežnine → New Time Blocks for Electricity and Grid Charges
od najdražjega (blok 1) do najcenejšega (blok 5) časovnega obdobja → from the most expensive (Block 1) to the cheapest (Block 5) time period
Obdobje → Period
Višja sezona → High season
Nižja sezona → Low season
Delovni dan → Workday
Dela prost dan → Non-working day
Blok → Block
I found that the sensor data is being written to a data file every hour!
The entity sensor.tarife_p1_meter_faza3_mesecno_3 was the last in the high season as the entity for a time block 3.
It is logical that the last changed record was made 2025-03-01 00:00:00!
But while the entity sensor.tarife_p1_meter_faza3_mesecno_5 started to be valid from 2025-03-01 00:00:00, so logically the first record for this entity should be 2025-03-01 01:00:00 and not 2025-03-01 00:00:00, because the low season has just started and it is also a public holiday, block 5 comes into effect.
Can anyone help me with what is happening or why the record for the entity sensor.tarife_p1_meter_faza3_mesecno_5 is already written with 2025-03-01 00:00:00 and not 2025-03-01 01:00:00 as would be logical?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello.
In the query, I would like to get the result for the last maximum record for the previous month for the entity
sensor.tarife_p1_meter_faza3_mesecno_5
, which is some kind a tariff sensor (in Slovenia we call this a time block, because we also have a higher and lower tariff “winter/all else”).The current query returns me the result for the first entry of the current month (which is the first record, because this time block came into effect on
2025-03-01 at 00:00:00
) instead of the query showing me 0 (there was no data before that).So, I would need the data for
2025-02-28 23:59:59
, which actually does not exist.Current query:

Let me try to explain what’s happening.
The table shows the billing system:

Translation:
I found that the sensor data is being written to a data file every hour!
The entity
sensor.tarife_p1_meter_faza3_mesecno_3
was the last in the high season as the entity for a time block 3.It is logical that the last changed record was made
2025-03-01 00:00:00
!But while the entity
sensor.tarife_p1_meter_faza3_mesecno_5
started to be valid from2025-03-01 00:00:00
, so logically the first record for this entity should be2025-03-01 01:00:00
and not2025-03-01 00:00:00
, because the low season has just started and it is also a public holiday, block 5 comes into effect.Can anyone help me with what is happening or why the record for the entity
sensor.tarife_p1_meter_faza3_mesecno_5
is already written with2025-03-01 00:00:00
and not2025-03-01 01:00:00
as would be logical?Thanks for the help.
Beta Was this translation helpful? Give feedback.
All reactions