File: room.py

package info (click to toggle)
python-boschshcpy 0.2.92-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 268 kB
  • sloc: python: 3,343; makefile: 4; sh: 4
file content (21 lines) | stat: -rw-r--r-- 475 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
class SHCRoom:
    def __init__(self, api, raw_room):
        self._api = api
        self._raw_room = raw_room

    @property
    def id(self):
        return self._raw_room["id"]

    @property
    def icon_id(self):
        return self._raw_room["iconId"]

    @property
    def name(self):
        return self._raw_room["name"]

    def summary(self):
        print(f"Room: {self.id}")
        print(f"  Name   : {self.name}")
        print(f"  Icon Id: {self.icon_id}")