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

Offline kroonen

  • Full Member
  • ***
  • Beiträge: 132
    • http://www.kroonen.eu/mobile
user reading to remove unit of measurement
« am: 22 Dezember 2017, 21:45:54 »
Hi,

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: 3701
  • 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 PI3: HM-CFG-USB, 40x HM, ZWave-USB, 6x ZWave, EnOcean-PI, 3x EnOcean, DashButtons, CO2, ESP-Multisensor, FireTV, NanoLeaf, ...
FHEM 5.8 PI2: HM-CFG-USB, 25x HM, ZWave-USB, 4x ZWave, EnOcean-PI, 3x EnOcean, KODI, ha-bridge, ...
FHEM 5.8 PI3 (Test): HM-MOD-PCB, Alexa (alexa-fhem), Google Home