Energy: Add fixed daily cost

Unfortunately, i am getting an error

2022-05-08 19:37:00 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'as_timestamp' got invalid input 'unknown' when rendering template '{{ (((as_timestamp(states
('sensor.date_time_iso')) / 3600)-1652016564) | int) / 1000}}' but no default was specified. Currently 'as_timestamp' will return 'None', however this template will fail to render in Ho
me Assistant core 2022.6

My template is:

  - name: "Fixed Charges"
    unit_of_measurement: "kWh"
    device_class: energy
    state_class: total_increasing
    state: >-
      {{ (((as_timestamp(states('sensor.date_time_iso')) / 3600)-1652016564) | int) / 1000}}

    attributes:
      last_reset: '1970-01-01T00:00:00+00:00'