pathartl / TeamsPresence

A .NET console application that will update entities in Home Assistant based on Microsoft Teams status
Creative Commons Zero v1.0 Universal
32 stars 7 forks source link

Icon attribute is not being set correctly #2

Open Valdorama opened 1 year ago

Valdorama commented 1 year ago

Just starting using this and it's great, but I noticed that the icon for my sensors was not being updated. Looking at the state and attribute info in HA, I can see that the icon value is being assigned to the 'state' attribute:

image

I think the problem is at line 9 in HomeAssistantEntityStateUpdateAttributes.cs:

public class HomeAssistantEntityStateUpdateAttributes
    {
        [JsonProperty(PropertyName = "friendly_name")]
        public string FriendlyName { get; set; }
        [JsonProperty(PropertyName = "state")]
        public string Icon { get; set; }
    }

Should that "state" be "icon" instead?