-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: 'datetime.datetime' object is not callable #259
Comments
There was some changes in the templates I had to make. |
Okay - will look into this. You are aware that you can just enable automatic tariff data, right? |
Yes. It's super nice, but it does not work for me after 1/7 when the energy charge changes again. I have a heat pump and hence reduced energy charge prices. So I need to calculate that the price changes every month when I have consumed 334 kWh. |
No need to miss out on auto tariffs just for that. You have the tariff sum as a variable in the templates. |
You are right. So with Vindstød VE Strøm, and looking into https://fm.dk/media/26367/faktaark_lempelse-af-elafgift-til-minimumssats-i-seks-maaneder.pdf The template should look like this:
So it subtracts the diff between the regular energy price of 69.7 incl VAT and the reduced one incl VAT. I multiply with 0.8 to remove VAT as I believe you add VAT automatically ? |
Don't know what the 69.7 you have is, but yes - all prices in the template is WITHOUT VAT, as the integration calculates this automatically based on your settings. |
According to FM, the energy price will be 69,7 øre kr/kWh in H2 2023. But ofc, it's øre, so the above needs to be reduced by 100 :)
|
Shouldn't it just be 0.008? |
So ... is the 0.008 with or without VAT ... hmm |
0.008 is without. Current elafgift is 0.008 without VAT and 0.01 with VAT |
Ah. I see. then 0.697 is also without VAT. Exposing the |
With #261 would the use case then be like this?
|
More like this - without having done any tests to confirm yet
It's not possible to send variable changes back from templates, as far as I can see. |
I'm pretty sure if you do not do anything in your template, the calculated price will be using the regular charged price of So I believe you must subtract
This would remove the difference between the current charged price |
Not into the reduction rules anymore, but you are right - my example reduced by the full amount. |
I'll release the patch later today, and if you then could confirm the template is working, I think I'll add the example to the wiki, if that is okay for you. |
If you release a beta release, I can test it out right away. Yes, let's add it to the wiki. I think a lot of people could benefit from the example if they monitor their usage and have heat pumps giving them reduced charged prices. But ofc it requires a sensor. We could also possibly look into that you can provide a sensor entity to EDS during config with the current month's power consumption, and then it auto-calculates. |
Just pushed 1.2.3 as a pre-release, please do test and let me know if it works |
I can confirm 1.2.3 works with the regular template again, as mentioned in the issue text. Also tested with auto tariff and the following template:
Also works. |
I'll mark it as a normal release at once and get that template in the wiki - thanks :) |
Can you explain this?
|
Ah. Yes. Vores Elnet which is my provider has a yearly fee of 402 kr ex VAT (abonnement). So I added it to the kW price too in my case to get my total of "what I'm paying to get power". You should leave it out in the wiki. |
So just to confirm - this should be the one for the wiki?
|
And another thing - isn't the reduction for all the months of the year, and not just for the last 6 months? |
You are right. Which means we could remove |
Right :) |
|
Need to check to source - that doesn't sound right |
It does not like to use it inside the template. Seems it did not test the |
I've updated the wiki to reflect the working variable |
hmm.. none of them seem to work
Do they work for you? |
Nope - but I think I know why ;) |
Should be fixed now - and the correct variable is el_afgift ;) |
Yes. Works now. |
The latest release v1.2.2 gives me this issue. I think it's because of the template used.
Template:
The template works in Developer Tools.
The text was updated successfully, but these errors were encountered: