{"action":"created","issue":{"url":"https://api.github.com/repos/home-assistant/home-assistant/issues/16445","repository_url":"https://api.github.com/repos/home-assistant/home-assistant","labels_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/16445/labels{/name}","comments_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/16445/comments","events_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/16445/events","html_url":"https://github.com/home-assistant/home-assistant/pull/16445","id":357408380,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEzNDMxMzAw","number":16445,"title":"Make the Qnap sensor more resilient if server is not reachable","user":{"login":"mrosseel","id":1465310,"node_id":"MDQ6VXNlcjE0NjUzMTA=","avatar_url":"https://avatars3.githubusercontent.com/u/1465310?v=4","gravatar_id":"","url":"https://api.github.com/users/mrosseel","html_url":"https://github.com/mrosseel","followers_url":"https://api.github.com/users/mrosseel/followers","following_url":"https://api.github.com/users/mrosseel/following{/other_user}","gists_url":"https://api.github.com/users/mrosseel/gists{/gist_id}","starred_url":"https://api.github.com/users/mrosseel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrosseel/subscriptions","organizations_url":"https://api.github.com/users/mrosseel/orgs","repos_url":"https://api.github.com/users/mrosseel/repos","events_url":"https://api.github.com/users/mrosseel/events{/privacy}","received_events_url":"https://api.github.com/users/mrosseel/received_events","type":"User","site_admin":false},"labels":[{"id":527871105,"node_id":"MDU6TGFiZWw1Mjc4NzExMDU=","url":"https://api.github.com/repos/home-assistant/home-assistant/labels/cla-signed","name":"cla-signed","color":"008000","default":false},{"id":451931292,"node_id":"MDU6TGFiZWw0NTE5MzEyOTI=","url":"https://api.github.com/repos/home-assistant/home-assistant/labels/core","name":"core","color":"c5def5","default":false},{"id":805697812,"node_id":"MDU6TGFiZWw4MDU2OTc4MTI=","url":"https://api.github.com/repos/home-assistant/home-assistant/labels/docs-missing","name":"docs-missing","color":"83f26f","default":false},{"id":955422305,"node_id":"MDU6TGFiZWw5NTU0MjIzMDU=","url":"https://api.github.com/repos/home-assistant/home-assistant/labels/in%20progress","name":"in progress","color":"ededed","default":false},{"id":529306678,"node_id":"MDU6TGFiZWw1MjkzMDY2Nzg=","url":"https://api.github.com/repos/home-assistant/home-assistant/labels/platform:%20sensor.qnap","name":"platform: sensor.qnap","color":"ededed","default":false},{"id":832964196,"node_id":"MDU6TGFiZWw4MzI5NjQxOTY=","url":"https://api.github.com/repos/home-assistant/home-assistant/labels/small-pr","name":"small-pr","color":"e5bd7e","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-09-05T21:20:22Z","updated_at":"2018-09-10T12:07:26Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/home-assistant/home-assistant/pulls/16445","html_url":"https://github.com/home-assistant/home-assistant/pull/16445","diff_url":"https://github.com/home-assistant/home-assistant/pull/16445.diff","patch_url":"https://github.com/home-assistant/home-assistant/pull/16445.patch"},"body":"## Description:\r\n\r\nMy Qnap NAS server is booted on a schedule, so it's not always on when HA restarts.\r\n**Current behaviour** is that if the NAS is not online, a persistent notification is posted and there's an error in the log.\r\n\r\n**Goal**: silence this error if the NAS is not reachable, and let HA retry the connection till the NAS is on.\r\n\r\nWhat I did: \r\n- added a configuration boolean 'ALLOW_UNREACHABLE'\r\n- checked that if the NAS is not found and this boolean is True, the notification is not triggered.\r\n- raise PlatformNotReady so that HA will retry\r\n \r\n**possible issues**: \r\n- added ALLOW_UNREACHABLE to const.py, I realise this might not be wanted but there are many other components having this config option but declaring it in their own .py file. If this PR is accepted, some cleanup is possible in these files.\r\n- if the NAS goes offline again, the old values are kept so we risk looking at stale values. This is also the case in the current implementation.\r\n- I've held of on the documentation as this is my first PR, first want to see if the direction is ok etc.\r\n- There was no test for this file, and I haven't added any.\r\n\r\n## Example entry for `configuration.yaml` (if applicable):\r\n```yaml\r\nsensor:\r\n  - platform: qnap\r\n    host: 192.168.0.10\r\n    ssl: false\r\n    username: user\r\n    password: mypassword\r\n    allow_unreachable: True\r\n    monitored_conditions:\r\n      - status\r\n      - cpu_usage\r\n```\r\n\r\n## Checklist:\r\n  - [X] The code change is tested and works locally.\r\n  - [X] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**\r\n\r\nIf user exposed functionality or configuration variables are added/changed:\r\n  - [ ] Documentation added/updated in [home-assistant.github.io](https://github.com/home-assistant/home-assistant.github.io)\r\n\r\nIf the code does not interact with devices:\r\n  - [ ] Tests have been added to verify that the new code works.\r\n"},"comment":{"url":"https://api.github.com/repos/home-assistant/home-assistant/issues/comments/419889783","html_url":"https://github.com/home-assistant/home-assistant/pull/16445#issuecomment-419889783","issue_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/16445","id":419889783,"node_id":"MDEyOklzc3VlQ29tbWVudDQxOTg4OTc4Mw==","user":{"login":"frenck","id":195327,"node_id":"MDQ6VXNlcjE5NTMyNw==","avatar_url":"https://avatars0.githubusercontent.com/u/195327?v=4","gravatar_id":"","url":"https://api.github.com/users/frenck","html_url":"https://github.com/frenck","followers_url":"https://api.github.com/users/frenck/followers","following_url":"https://api.github.com/users/frenck/following{/other_user}","gists_url":"https://api.github.com/users/frenck/gists{/gist_id}","starred_url":"https://api.github.com/users/frenck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frenck/subscriptions","organizations_url":"https://api.github.com/users/frenck/orgs","repos_url":"https://api.github.com/users/frenck/repos","events_url":"https://api.github.com/users/frenck/events{/privacy}","received_events_url":"https://api.github.com/users/frenck/received_events","type":"User","site_admin":false},"created_at":"2018-09-10T12:07:26Z","updated_at":"2018-09-10T12:07:26Z","author_association":"MEMBER","body":"@mrosseel Correct! Since the parameter has been removed."}}
{"actor":{"display_login":"frenck"}}