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

Offline kroonen

  • Full Member
  • ***
  • Beiträge: 131
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

Offline MadMax-FHEM

  • Hero Member
  • *****
  • Beiträge: 3475
  • 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.8 Pi 3: HM-CFG-USB, 40x HM, ZWave-USB, 5x ZWave, EnOcean-PI, 3x EnOcean, DashButtons, CO2, ESP-Multisensor, FireTV, NanoLeaf
FHEM 5.8 PI 2: HM-CFG-USB, 23x HM, ZWave-USB, 3x ZWave, EnOcean-PI, 3x EnOcean, CO2, KODI, ha-bridge
FHEM 5.8 PI 3 (Test): HM-MOD-PCB, Alexa (alexa-fhem), Google Home