CestLaGalere / mobilealerts

Retrieves sensor data for Mobile Alerts sensors for Home Assistant
Apache License 2.0
15 stars 6 forks source link

Windsensor MA10660 Wind direction in Letters #17

Open DerMetze1 opened 7 months ago

DerMetze1 commented 7 months ago

Hello, how do i get Letters output for Wind direction?

for example I only get 3 for ENE.

Thanks for help

  - platform: mobile_alerts
    phone_id: XXXXXXXXXXX
    devices:
      - device_id: XXXXXXXXXXX
        name: Schlafzimmer Temp
        type: t1
      - device_id: XXXXXXXXXXX
        name: Schlafzimmer Humidity
        type: h
      - device_id: XXXXXXXXXXX
        name: Außen Temp
        type: t1
      - device_id: XXXXXXXXXXX
        name: Außen Humidity
        type: h
      - device_id: XXXXXXXXXXX
        name: Windgeschwindigkeit
        type: ws
      - device_id: XXXXXXXXXXX
        name: Windrichtung
        type: wd
      - device_id: XXXXXXXXXXX
        name: Windboe
        type: wg
MichaelS1955 commented 7 months ago

I would like to know it too

petrleocompel commented 4 months ago

@DerMetze1 @MichaelS1955

What exactly is problem with this.

The number you get is equal to enum (but also number*22.5 is degree azimut - which can be used in HA for native wind direction)

 0: N
 1: NNE
 2: NE
 3: ENE
 4: E
 5: ESE
 6: SE
 7: SSE
 8: S
 9: SSW
 10: SW
 11: WSW
 12: W
 13: WNW
 14: NW
 15: NNW

You can create template integration for weather.

  - platform: mobile_alerts
    phone_id: XXXXXXXXXXX
    devices:
      - device_id: XXXXXXXXXXX
        name: Schlafzimmer Temp
        type: t1
      - device_id: XXXXXXXXXXX
        name: Schlafzimmer Humidity
        type: h
      - device_id: XXXXXXXXXXX
        name: Außen Temp
        id: out_temp
        type: t1
      - device_id: XXXXXXXXXXX
        name: Außen Humidity
        id: out_humid
        type: h
      - device_id: XXXXXXXXXXX
        name: Windgeschwindigkeit
        id: wind_speed
        type: ws
      - device_id: XXXXXXXXXXX
        name: Windrichtung
        type: wd
        id: wind_direction
      - device_id: XXXXXXXXXXX
        name: Windboe
        id: wind_gust
        type: wg

# Example configuration.yaml entry
weather:
  - platform: template
    name: "My Weather Station"
    condition_template: "{{ states('weather.my_region') }}"
    temperature_template: "{{ states('sensor.out_temp') | float }}"
    temperature_unit: "°C"
    humidity_template: "{{ states('sensor.out_humid') | float }}"
    wind_speed_template: "{{ states('sensor.wind_speed') | float }}"
    wind_gust_speed_template: "{{ states('sensor.wind_gust') | float }}"
    wind_bearing_template:  "{{ states('sensor.wind_direction') | float * 22.5 }}"

And by this you should get native HA entity with weather