[RESOLVED] How to set up TTN sensor values?

Hi there,

I have a LoraWan module and i have succesfully sent some data to TTN. I have the TTN component setup, but i don’t know how to setup my sensor. The data is a counter of how many times a button is pressed (in hex values):

The sensor example shows:

# Example configuration.yaml entry
sensor:
  - platform: thethingsnetwork
    device_id: ha-demo
    values:
      sensor_value: unit of measurement
      voltage: V

What do i have to put in the values section?

greetz,

Rudolf

Good news: I do receive values from TTN
Bad news: Two hours too late.

In TTN I can see that there’s actual data but the sensors is updated with data of two hours ago. I guess it has to do with Timezones. But i can’t figure it out exactly.
HassOs Uses UTC so my system time is one hour earlier than in my time zone.

If someone has a clue…

It’s actually a bug. The sensor is returning the oldest value from the datastorage api instead of the most recent.

Whoop, whoop. Just submitted a pull request to fix the bug in the sensor.

Hi,

what did you put in the values section?

regards, Flo

Another question :slight_smile: . Having my TTN Application use different FPorts. Want to only integrate one of these FPort data. Anyone ideas?

Thanks and greetings

Jakob

My question too … what goes in the values section? You obviously solved it!

Hi honestly don’t remember. I disposed the integration due to lack of coverage in my home area.
If possible i’ll try to set it up at work the coming days. I’ll keep you posted.

I figured it out in the end ! Look here TTN (The Things Network) Integration