What is the platform for a number in configuration.yanl configuration?

Clueless YAML newbie and beginner at Home Assistant here. I’m getting this error from “CHECK CONFIGURATION”:

Invalid config for [number]: required key not provided @ data['platform']. Got None. (See /config/configuration.yaml, line 389).

Line 389 is this section of configuration.yaml:

    unit_of_measurement: "W"
    min: -1000.0
    max: 1000.0
    initial: 0.0

I am attempting to calculate a value by using an automation with 2 sensors providing data and store the result in the number.front_window_heat entity

The documentation for the ‘Number’ integration explains it’s a “building block” for use by other integrations to create a number entity. Typically, these other integrations create number entities automatically for a discovered device.

Currently, the integrations that allows a user to define a number entity are MQTT Number and Template.

I suggest you use the Template integration to create a number entity.

Thank you for the clue. I cannot say I completely understand it, but this configuration in configuration.yaml is working now.

  - trigger:
    - platform: state
      entity_id: sensor.mqtt_node3_temperature
      - name: "windowheat"
        unique_id: id00000039
        state: "{{ states('sensor.mqtt_node3_temperature') | float(1) - states('sensor.mqtt_node2_hotbox_temperature
') | float(1) * 2.8 * 5.0 }}"
        step: '{{ 1 }}'
          service: number.set_value
            entity_id: number.windowheat
            power: "{{ state }}"

You’re welcome!

Please consider marking my post above with the Solution tag. It will automatically place a check-mark next to the topic’s title which signals to other users that this topic has been resolved. This helps users find answers to similar questions.

For more information about the Solution tag, refer to guideline 21 in the FAQ.

1 Like