{"action":"closed","issue":{"url":"https://api.github.com/repos/kevinvincent/ha-wyzesense/issues/41","repository_url":"https://api.github.com/repos/kevinvincent/ha-wyzesense","labels_url":"https://api.github.com/repos/kevinvincent/ha-wyzesense/issues/41/labels{/name}","comments_url":"https://api.github.com/repos/kevinvincent/ha-wyzesense/issues/41/comments","events_url":"https://api.github.com/repos/kevinvincent/ha-wyzesense/issues/41/events","html_url":"https://github.com/kevinvincent/ha-wyzesense/issues/41","id":504794234,"node_id":"MDU6SXNzdWU1MDQ3OTQyMzQ=","number":41,"title":"Contact Sensor device class (door/window)","user":{"login":"4841penoyer","id":56202579,"node_id":"MDQ6VXNlcjU2MjAyNTc5","avatar_url":"https://avatars1.githubusercontent.com/u/56202579?v=4","gravatar_id":"","url":"https://api.github.com/users/4841penoyer","html_url":"https://github.com/4841penoyer","followers_url":"https://api.github.com/users/4841penoyer/followers","following_url":"https://api.github.com/users/4841penoyer/following{/other_user}","gists_url":"https://api.github.com/users/4841penoyer/gists{/gist_id}","starred_url":"https://api.github.com/users/4841penoyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/4841penoyer/subscriptions","organizations_url":"https://api.github.com/users/4841penoyer/orgs","repos_url":"https://api.github.com/users/4841penoyer/repos","events_url":"https://api.github.com/users/4841penoyer/events{/privacy}","received_events_url":"https://api.github.com/users/4841penoyer/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2019-10-09T17:38:19Z","updated_at":"2019-10-14T17:37:16Z","closed_at":"2019-10-14T17:37:16Z","author_association":"NONE","body":"I have a good number of contact sensors that I'm using to monitor the status of windows, but they all use a door for their icon.  I went into Home Assistant and changed the device class from Door to Window and they started to show up as windows.  \r\n\r\nHowever, whenever the windows are opened or closed the device type reverts to door.  \r\n\r\nLooks like it is these two lines of code (I don't really know Python)  \r\n\r\nSets the device type to door (or motion)\r\nhttps://github.com/kevinvincent/ha-wyzesense/blob/e826fd88ae0ccd819e694e577d53a46ae543d05f/custom_components/wyzesense/binary_sensor.py#L62\r\n\r\nOverwrites all data\r\nhttps://github.com/kevinvincent/ha-wyzesense/blob/e826fd88ae0ccd819e694e577d53a46ae543d05f/custom_components/wyzesense/binary_sensor.py#L75\r\n\r\n\r\nIs it possible change this behavior so it doesn't update the device class whenever a state change is triggered?  "}}
{"actor":{"display_login":"4841penoyer"}}