{"action":"created","issue":{"url":"https://api.github.com/repos/RPi-Distro/python-gpiozero/issues/66","labels_url":"https://api.github.com/repos/RPi-Distro/python-gpiozero/issues/66/labels{/name}","comments_url":"https://api.github.com/repos/RPi-Distro/python-gpiozero/issues/66/comments","events_url":"https://api.github.com/repos/RPi-Distro/python-gpiozero/issues/66/events","html_url":"https://github.com/RPi-Distro/python-gpiozero/issues/66","id":111196109,"number":66,"title":"Suggestion - add relay class?","user":{"login":"raspitv","id":3852415,"avatar_url":"https://avatars.githubusercontent.com/u/3852415?v=3","gravatar_id":"","url":"https://api.github.com/users/raspitv","html_url":"https://github.com/raspitv","followers_url":"https://api.github.com/users/raspitv/followers","following_url":"https://api.github.com/users/raspitv/following{/other_user}","gists_url":"https://api.github.com/users/raspitv/gists{/gist_id}","starred_url":"https://api.github.com/users/raspitv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raspitv/subscriptions","organizations_url":"https://api.github.com/users/raspitv/orgs","repos_url":"https://api.github.com/users/raspitv/repos","events_url":"https://api.github.com/users/raspitv/events{/privacy}","received_events_url":"https://api.github.com/users/raspitv/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-10-13T14:47:22Z","updated_at":"2015-10-14T08:42:23Z","closed_at":null,"body":"I've been hacking up a thing I'll be blogging about in a day or two. It uses a small arduino relay board that triggers when a port is 0 and is off when a port is 1. I've been using the LED class to drive it, but obviously have to invert the logic. It would be nice to have an inverted logic class so that you could address a relay as e.g. lamp.on() for it to be on instead of lamp.off() when you wanted it switched on.\r\n\r\nIt would certainly make things easier for kids. The only other way round it is to wire up the lamp to the NC terminal but then it's always on unless actively switched off, which isn't ideal either. It's a suggested addition that I think would be very worthwhile."},"comment":{"url":"https://api.github.com/repos/RPi-Distro/python-gpiozero/issues/comments/147976091","html_url":"https://github.com/RPi-Distro/python-gpiozero/issues/66#issuecomment-147976091","issue_url":"https://api.github.com/repos/RPi-Distro/python-gpiozero/issues/66","id":147976091,"user":{"login":"waveform80","id":1076190,"avatar_url":"https://avatars.githubusercontent.com/u/1076190?v=3","gravatar_id":"","url":"https://api.github.com/users/waveform80","html_url":"https://github.com/waveform80","followers_url":"https://api.github.com/users/waveform80/followers","following_url":"https://api.github.com/users/waveform80/following{/other_user}","gists_url":"https://api.github.com/users/waveform80/gists{/gist_id}","starred_url":"https://api.github.com/users/waveform80/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/waveform80/subscriptions","organizations_url":"https://api.github.com/users/waveform80/orgs","repos_url":"https://api.github.com/users/waveform80/repos","events_url":"https://api.github.com/users/waveform80/events{/privacy}","received_events_url":"https://api.github.com/users/waveform80/received_events","type":"User","site_admin":false},"created_at":"2015-10-14T08:42:22Z","updated_at":"2015-10-14T08:42:22Z","body":"Right, there's the PR - go play and let me know if it's okay (haven't got any relays on my ever more cluttered desk! :)"}}