Hi there,
I’m genuinely sorry if this is out there, I have read a lot of stuff but all config setups I try don’t seem to work.
Real world scenario is: I have a new smart meter and it’s all connected up. I have to point all my plugs to use the sensor’s value for price.
But what if I move house? Or get a different smart meter interface? I’d have to update all my plugs to point to the new device, one by one.
I’d rather point everything to some kind of variable that in turn I can link up to the smart meter’s value.
This is one example, but this scenario is something I’d like to figure out how to achieve in general.
Can I have an input_number
mediate the value of my sensor.electricity_price_per_kwh
? Or perhaps another template sensor?
I’ve tried various examples and reloaded HA config, but nothing appears in the entities list.
Here’s the last few things I tried (in configuration.yaml
):
input_number:
kwhprice:
name: "Electricity - price per kWh"
data_template:
value: "{{ states('sensor.electricity_price_per_kwh') }}"
unit_of_measurement: "GBP/kWh"
mode: box
template:
sensor:
- platform: template
sensors:
electricity_price_per_hour:
name: "Electricity: price per kWh"
friendly_name: "Electricity: price per kWh"
unit_of_measurement: "GBP/kWh"
value_template: >
{{ states('sensor.electricity_price_per_kwh') }}
The configurations validate, but nothing appears in helpers or entities.
Edit: I could have an automation to run on a timer but this would not be live - is there any way to have something act as a mediator for config abstraction or is that not a thing in HA?
Many thanks in advance!