Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 95437

Template sensor data types

$
0
0

@Cheesenwine wrote:

I can’t find a list of different available data types for the template sensor. I have the following template derived from a Modbus output, but the result is an int/ whole number. Does anyone have a reference to all the different available data types to choose from?

      - name: SMA Solar Power
        hub: SB5
        unit_of_measurement: kW
        slave: 3
        register: 30775
        count: 2
        data_type: uint
        scale: 0.001
        precision: 3

  - platform: template
    sensors:
      sma_solar_power_filtered:
        friendly_name: "Solar Power"
        unit_of_measurement: 'kW'
        value_template: >-
          {% if (states('sensor.SMA_Solar_Power') | int >= 20000) %}
            0
          {% else %}
            {{(states('sensor.SMA_Solar_Power') | int)}}
          {% endif %}  

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 95437

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>