Skip to content

Commit 0f60305

Browse files
authored
Merge pull request #665 from seamapi/beta
Compatibility with stable thermostat APIs
2 parents 929dbd5 + 062e61e commit 0f60305

File tree

51 files changed

+5692
-6568
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+5692
-6568
lines changed

.storybook/seed-fake.js

Lines changed: 1 addition & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,7 @@ export const seedFake = (db) => {
2323
})
2424

2525
db.simulateWorkspaceOutage(ws3.workspace_id, {
26-
routes: [
27-
'/devices/list',
28-
'/access_codes/list',
29-
'/thermostats/climate_setting_schedules/list',
30-
],
26+
routes: ['/devices/list', '/access_codes/list'],
3127
})
3228

3329
const cw = db.addConnectWebview({
@@ -394,15 +390,6 @@ export const seedFake = (db) => {
394390
temperature_fahrenheit: 70,
395391
current_climate_setting: {
396392
hvac_mode_setting: 'heat_cool',
397-
manual_override_allowed: false,
398-
cooling_set_point_fahrenheit: 75,
399-
cooling_set_point_celsius: 23.8,
400-
heating_set_point_fahrenheit: 65,
401-
heating_set_point_celsius: 18.3,
402-
},
403-
default_climate_setting: {
404-
hvac_mode_setting: 'heat_cool',
405-
manual_override_allowed: false,
406393
cooling_set_point_fahrenheit: 75,
407394
cooling_set_point_celsius: 23.8,
408395
heating_set_point_fahrenheit: 65,
@@ -421,12 +408,10 @@ export const seedFake = (db) => {
421408
min_cooling_set_point_celsius: 18.333333333333336,
422409
min_heating_set_point_celsius: 7.222222222222222,
423410
min_heating_cooling_delta_celsius: 2.7777777777777777,
424-
is_temporary_manual_override_active: false,
425411
name: 'Apartment 21A',
426412
image_url:
427413
'https://connect.getseam.com/assets/images/devices/ecobee_3-lite_front.png',
428414
image_alt_text: 'Placeholder Lock Image',
429-
is_climate_setting_schedule_active: false,
430415
},
431416
errors: [],
432417
})
@@ -457,7 +442,6 @@ export const seedFake = (db) => {
457442
temperature_fahrenheit: 70,
458443
current_climate_setting: {
459444
hvac_mode_setting: 'heat',
460-
manual_override_allowed: false,
461445
heating_set_point_celsius: 20,
462446
heating_set_point_fahrenheit: 68,
463447
},
@@ -474,12 +458,10 @@ export const seedFake = (db) => {
474458
min_cooling_set_point_fahrenheit: 65,
475459
max_heating_set_point_fahrenheit: 79,
476460
min_heating_set_point_fahrenheit: 45,
477-
is_temporary_manual_override_active: false,
478461
name: 'debating book',
479462
image_url:
480463
'https://connect.getseam.com/assets/images/devices/ecobee_3-lite_front.png',
481464
image_alt_text: 'Placeholder Lock Image',
482-
is_climate_setting_schedule_active: false,
483465
},
484466
errors: [],
485467
})
@@ -551,51 +533,6 @@ export const seedFake = (db) => {
551533
noise_threshold_name: 'Active Hours',
552534
})
553535

554-
// add climate setting schedules
555-
db.addClimateSettingSchedule({
556-
device_id: device5.device_id,
557-
workspace_id: ws2.workspace_id,
558-
created_at: '2023-05-17T00:16:12.000',
559-
name: 'Guest - Robinson',
560-
schedule_starts_at: '2024-07-24T00:00:00.000Z',
561-
schedule_ends_at: '2024-08-01T00:00:00.000Z',
562-
schedule_type: 'time_bound',
563-
manual_override_allowed: true,
564-
hvac_mode_setting: 'cool',
565-
cooling_set_point_fahrenheit: 70,
566-
cooling_set_point_celsius: 21,
567-
})
568-
569-
db.addClimateSettingSchedule({
570-
device_id: device5.device_id,
571-
workspace_id: ws2.workspace_id,
572-
created_at: '2023-05-17T00:16:12.000',
573-
name: 'Guest - Cabrero',
574-
schedule_starts_at: '2024-07-04T00:00:00.000Z',
575-
schedule_ends_at: '2024-07-14T00:00:00.000Z',
576-
schedule_type: 'time_bound',
577-
manual_override_allowed: true,
578-
hvac_mode_setting: 'heat_cool',
579-
heating_set_point_fahrenheit: 65,
580-
heating_set_point_celsius: 18,
581-
cooling_set_point_fahrenheit: 72,
582-
cooling_set_point_celsius: 22,
583-
})
584-
585-
db.addClimateSettingSchedule({
586-
device_id: device5.device_id,
587-
workspace_id: ws2.workspace_id,
588-
created_at: '2022-05-17T00:16:12.000',
589-
name: 'Guest - Robinson with a very long title to test truncation and text wrap',
590-
schedule_starts_at: '2023-07-04T00:00:00.000Z',
591-
schedule_ends_at: '2027-08-14T00:00:00.000Z',
592-
schedule_type: 'time_bound',
593-
manual_override_allowed: true,
594-
hvac_mode_setting: 'cool',
595-
cooling_set_point_fahrenheit: 72,
596-
cooling_set_point_celsius: 22.2222,
597-
})
598-
599536
db.addClientSession({
600537
workspace_id: ws2.workspace_id,
601538
created_at: '2023-05-29T01:02:02.000',

.storybook/update-devicedb-seed.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ const seedDatabase = async (
3333
userIdentifierKey
3434
)
3535
const baseURL = seam.client.defaults.baseURL
36+
3637
seam.client.defaults.baseURL = new URL(
3738
'/internal/devicedb',
3839
baseURL

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export function App() {
8787
<seam-device-table publishable-key="your_publishable_key"></seam-device-table>
8888
<script
8989
type="module"
90-
src="https://react.seam.co/v/3.1.2/dist/elements.js"
90+
src="https://react.seam.co/v/4.0.0-beta.1/dist/elements.js"
9191
></script>
9292
</body>
9393
```
@@ -215,7 +215,7 @@ or place the following in the `<head>` tag:
215215
```html
216216
<link
217217
rel="stylesheet"
218-
href="https://react.seam.co/v/3.1.2/dist/index.min.css"
218+
href="https://react.seam.co/v/4.0.0-beta.1/dist/index.min.css"
219219
/>
220220
```
221221

0 commit comments

Comments
 (0)