Autor Thema: user reading to remove unit of measurement  (Gelesen 594 mal)

Offline kroonen

  • Full Member
  • ***
  • Beiträge: 137
user reading to remove unit of measurement
« am: 22 Dezember 2017, 21:45:54 »

I'm using the SmartmeterP1 and this gives a reading

ElectricityPowerDelivered    0.34 kW

I want to use the value for other stuff and publish it to mqtt topic, but the value is than 0.34 kW

So what I want is to remove te kW . I think this is possible with userreadings? Anybody knows how to do it?

thnx Richard

Online MadMax-FHEM

  • Hero Member
  • *****
  • Beiträge: 4947
  • NIVEAu ist keine Creme...
Antw:user reading to remove unit of measurement
« Antwort #1 am: 22 Dezember 2017, 21:56:20 »
Hi Richard,

yes userReadings using split oder ReadingsNum...
...or just send not the Value using ReadingsVal use ReadingsNum instead...

Bye, Joachim
FHEM 5.9 PI3: HM-CFG-USB, 40x HM, ZWave-USB, 6x ZWave, EnOcean-PI, 3x EnOcean, HUE, CO2, ESP-Multisensor, FireTV, KODI, alexa-fhem, ...
FHEM 5.9 PI2: HM-CFG-USB, 25x HM, ZWave-USB, 4x ZWave, EnOcean-PI, 3x EnOcean, KODI, ha-bridge, ...
FHEM 5.9 PI3 (Test): HM-MOD-PCB, Snips, Google Home, ...