Repository navigation
Replies: 5 comments 3 replies
|
Sorry, but no. For two reasons.
Having said that, if the need is big it can easily be done. The underlying pycheckwatt lib already supports it. Anyway that's the rationale and no 1 is the one that worries me. We don't want Checkwatt tu shut us down... /Marcus |
|
I hope you don t mind, but I converted this issue to a conversion. |
|
I have not tried it, but I think this should achieve what you want. automation:
- alias: "Reset Monthly Sensor"
trigger:
platform: time
at: "00:00:01"
condition:
condition: time
weekday: 1 # This ensures it only triggers on the 1st day of the month
action:
service: sensor.set
target:
entity_id: sensor.checkwatt_monthly_monetary_sensor
data:
value: 0
- alias: "Update Monthly Sensor"
trigger:
platform: time
at: "23:59:00"
action:
service: sensor.set
target:
entity_id: sensor.checkwatt_monthly_monetary_sensor
data_template:
value: "{{ states('sensor.checkwatt_monthly_monetary_sensor') | float + states('sensor.checkwatt_daily_monetary_sensor') | float }}"
sensor:
- platform: template
sensors:
checkwatt_monthly_monetary_sensor:
friendly_name: "Checkwatt Monthly Net Income"
unit_of_measurement: "Currency" # Replace with your currency unit
value_template: "{{ states('sensor.checkwatt_monthly_monetary_sensor') | float + states('sensor.checkwatt_daily_monetary_sensor') | float }}"
|
|
@faanskit Tackar, det ser ut att fungera bra. I automationen för att nollställa var jag tvungen att använda mig av: Sedan kunde man inte sätta värdet på en sensor manuellt vilket gjorde att jag skapade en Men det är mycket möjligt att allt går att få till utan mina förändringar om man har lite bättre koll än vad jag har. |
|
Delivered as part of v0.2.0-RC.1 |
Uh oh!
There was an error while loading. Please reload this page.
Do you have any plans on adding a "Current month net income" sensor ?
All reactions