Rule for calculating the cost of electricity

As you are using OH3, “now” is a zonedDateTime object and you will have to work with different methods to the OH2 rule that you copied.